WordPress.org

Ready to get started?Download WordPress

Forums

The Post LOOP withn page (2 posts)

  1. ZeFish
    Member
    Posted 6 years ago #

    Hi there, is there a way to mimic the loop of post in the frontpage but in subpage?

    I added this loop in my page.php :

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

    but it seems some feature are missing like the "comments_popup_link" tag is not working...

    Trying to be a little clearer, in my page, I added some kind of a special header but at the bottom I would like to show the post of the blog just as if you were in the frontpage... just can't get it to work

  2. Doodlebee
    Member
    Posted 6 years ago #

    If all you're trying to do is put in a "special header" for Pages only, then you could just go into your index.php file and do something like:

    <?php if(is_page()) { ?>
    //stuff for Page header here
    <?php }else { ?>
    // header for rest of the site here
    <?php } ?>

    And that would be it.

Topic Closed

This topic has been closed to new replies.

About this Topic