• I am displaying my posts in a customized template using the following code:

    $query = new WP_Query(array('cat' => 252,'posts_per_page' => 3));
    
    // The Loop
    if ( $query->have_posts() ) {
    
    while ( $query->have_posts() ) {
    $query->the_post();
    
    echo '<li>' . the_content() . '</li>';
    }
    wp_reset_postdata();
    } else {
    // no posts found
    }
    

    For some reason, the categories I excluded from displaying related articles still show the related articles on this template page. Is there a compatibility issue between the plugin and the WP_query function?

    • This topic was modified 7 years, 6 months ago by mluce.
    • This topic was modified 7 years, 6 months ago by mluce.
  • The topic ‘Plugin does not work well in customized templates’ is closed to new replies.