Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I trying to add parameters to the query string of an archive page.

So I verified that the following method works:

query_posts($query_string . '&order=ASC&meta_key=mykey&orderby=meta_value_num')

My problem is thus: My meta-value as-is can't be sorted properly; it first has to be altered via the php substr() function. But that breaks the query.

Any ideas how to get this done?

I've seen solutions posted where the database is queried directly, but aside from that obviously not being ideal, I also couldn't figure out how to page that.

Any help would be immensely appreciated :)

share|improve this question

closed as too localized by toscho Feb 18 '13 at 23:41

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.