Need help from an MySQL Master for Custom Ordering
-
Hi all,
I wrote a plugin to do sorting/ordering of posts by Custom Fields. My original attempt was to add a filter to the_posts filter, then sort it based on multiple queries to the db. It was very very inefficient, but had a bigger problem – the_posts returns posts after pagination, so it was sorting on each page seperately.
So I’ve decided that the only way to do this is to use the
posts_orderby
filter…but I don’t know how to formulate the query because I need to order by data from another table, wp_meta, and while it looks like ORDER BY can be used with user supplied procedures I’m not sure of the best way to go about this.Any pointers to get me in the right direction ?
Thanks in advance!
- The topic ‘Need help from an MySQL Master for Custom Ordering’ is closed to new replies.