WordPress.org

Ready to get started?Download WordPress

Forums

WP_Query("cat=4&showposts=4"); question (2 posts)

  1. lilith2014
    Member
    Posted 4 years ago #

    Good day,

    I would like to know how to change this code:
    <?php $recent = new WP_Query("cat=4&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>

    to display more categories, instead of only one?

    Newbie here, thank you.

  2. chinmoy
    Member
    Posted 4 years ago #

    <?php $recent = new WP_Query("showposts=4"); while($recent->have_posts()) : $recent->the_post();?>

    Try this once.

Topic Closed

This topic has been closed to new replies.

About this Topic