WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove title/author/date if post has Paginating with nextpage (3 posts)

  1. Geet Jacobs
    Member
    Posted 4 years ago #

    Good evening,

    I have been trying for to many hours to remove certain elements on a multi page post.

    Goal is to only show the author link and date on the first page of the post, then any pages of the post after that to just display the title.

    I had found is_paged, but sadly it only works with actual pages, not posts.

    Any help would be much appreciated!

    Geet Jacobs

  2. Geet Jacobs
    Member
    Posted 4 years ago #

    Ok solved! wow was it simple, weird I didn't find it anywhere through google.

    If anyone else wants to hide elements on a any multipage <!--nextpage--> posts after the initial page all you need to do is use the below code.

    <?php if($page > 1) :?>
    paste stuff here you only want on pages after the first.
    <?php else: ?>
    Paste stuff here you want to only display on the first page.
    <?php endif; ?>

    hope this helps someone else!

  3. Sonika
    Member
    Posted 4 years ago #

    geetjacobs, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags