Support » Fixing WordPress » Display specific category form post type in Loop

  • TataVostru

    (@tatavostru)


    For example if i have Mondene(category) in Post_Type : stiri
    How can i display only the category news…

    <?php
    $recentPosts = new WP_Query();
    $recentPosts->query(array('showposts' => 1, 'post_type' =>array('stiri')));
    ?>
    <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>

  • The topic ‘Display specific category form post type in Loop’ is closed to new replies.