Love the plugin but have just come up against an issue. I have a custom shortcode that gets a list of testimonials (from a custom post type). I need the shortcode to be able to get the relevant posts in random order. I can do this with CPO disabled but not when active. The query is currently:
$args = array( 'showposts' => $count, 'post_type' => 'testimonial', 'orderby' => 'rand', ); $testimonial = new WP_Query($args);
Can you tell me how to ensure that the orderby arg is obeyed and not overridden by CPO?
- The topic ‘Over-ride CPO in shortcode WP_query’ is closed to new replies.