custom get_posts query won’t work with the plugin activated
-
Hi,
a custom get_posts query won’t work with the plugin activated. I have installed the plugin which works great except it messes with custom code I am writing.
What I want to do is showing a random post and the latest post. This won’t work except when I disable the plugin.
Do you have any suggestions?
$args = array( ‘numberposts’ => ‘1’, ‘orderby’ => ‘rand’ );
$posts = get_posts( $args );
foreach( $posts as $post ){
setup_postdata( $post );
**** CODE HERE *****wp_reset_postdata();
}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘custom get_posts query won’t work with the plugin activated’ is closed to new replies.