wp_query serialised array

As I commented, if the meta value is a serialized string of an array like array( ‘Melbourne’, ‘Sydney’ ), then ‘value’ => ‘”(Melbourne|Sydney)”‘, ‘compare’ => ‘REGEXP’ would work. So there’s no need for a complex regular expression pattern, and your meta_query could look like so where $locations is an array of locations: ‘meta_query’ => array( … Read more

Why doesn’t PhotoSmash plugin play well with wp_query?

There is no need to juggle $wp_query object, store it in temp, etc. It is rarely good idea to directly mess with important global variables, unless you absolutely need to. You can just create your own arbitrary variable and init it with new WP_query $some_variable = new WP_Query($args); and so on. Also don’t forget to … Read more

Stomping WP_Query in author archive to facilitate pagination with custom queries

t31os says: [See edit history for previous code and comments] Using Ajax to paginate your queries I’ve put together some code that will fetch your posts and comments via ajax using simple prev/next navigation via ajax. 1) Replace all the code you posted in your author.php with the following.. <?php $cat_settings = array( ‘Articles’ => … Read more