• 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)
  • Plugin Author Ryan Hellyer

    (@ryanhellyer)

    Do you experience this same problem when all plugins are deactivated and using a default theme?

    This shouldn’t occur just by activating the plugin, so you presumably have instantiated the MN_Reorder code somewhere, so you may need to add the instantiation code to trigger the bug. If that is indeed the case, it would be great if you could copy/paste the exact code you use here.

    Thanks ??

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    ^ it’s also possible I’m wrong, but from what I can see in the code, this shouldn’t occur with the default usage.

    • This reply was modified 8 years, 4 months ago by Ryan Hellyer.
    Plugin Author Ronald Huereca

    (@ronalfy)

    What are your advanced settings? This can mess with custom queries.

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.