• Hi guys,

    I have a page acting as the front page of a blog where I’ve split the content into two parts with the <!–nextpage–> quicktag. My idea is to show the first subpage in one part of the page and the other in another part, but I don’t know how to display “page two” in the page’s content.

    The following code works for the first part, but how should I change it for displaying the second subpage?

    <?php if(have_posts()): ?> <?php while(have_posts()): the_post(); ?>
    <?php the_content(); ?>
    <?php endwhile; endif; ?>

    Must be something really simple, but I was unable to find the answer after hours of searching.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You are mixing things. “Sub-Pages” are Pages that are hierarchically ‘under’ another Page – and this has nothing to do with splitting an entry (be it post or Page) with the <!--nextpage--> quicktag.

    On the other hand, if you split a post/Page with the ‘nextpage’ – then it is split. Period. Cannot display the two parts on the same page.

    So, back to the basics. Don’t tell HOW do you want to do things. Describe simply WHAT you want to achieve.

    Thread Starter Ude

    (@ude)

    Thanks for the reply and sorry for using the wrong term! Actually I was wondering would it be mixed up with what sub-pages really are. Now I know. ??

    Also good to know that it technically isn’t possible what I’m trying to achieve. I was trying to use the content of the page as edible “fields”, one for latest news (in its own place in the page) and in “next page” there would have been a youtube embed-code that would have been in another place in the page. The idea would have been just to have them easily editable.

    But if there is a better way in WordPress to manage snipets of easily editable code, I’m all ears (well, Widgets are one way, but the front page at present doesn’t have a sidebar, nor will have one).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to display a certain subpage of a page?’ is closed to new replies.