WordPress.org

Support

Support » How-To and Troubleshooting » Display specific category form post type in Loop

Display specific category form post type in Loop

  • 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.