WordPress.org

Ready to get started?Download WordPress

Forums

Hide pagination on front page? (2 posts)

  1. chris.op
    Member
    Posted 4 years ago #

    I have limited my front page to show the 3 latest posts. My blog contains more posts than this so by default at the end of the the 3 posts, Next Page appears.

    I would like to remove this for the front page only, something like this...

    <?php if (is_front_page()) remove_pagination(); } ?>

    For the life of me I can't seem to find anything relevant on the forums about this.

    TIA

  2. vtxyzzy
    Member
    Posted 4 years ago #

    Without seeing your code, I can offer only a general suggestion. Put a conditional statement around the code for pagination, something like this:

    <?php if (!is_front_page()) {
       // pagination code here
    } ?>

    Or, just remove the pagination code entirely if the template is used only for the front page.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags