[resolved] subpages invisible (4 posts)

  1. mores
    Posted 10 years ago #

    first post, so hello everybody!

    i just installed wordpress and i'm using the WordPress Default 1.5 theme.

    i'd like to be able to post thoughts etc, and i think i figured out how to do this. photo blogging is a little harder to do than with easymoblog, but i'll manage.

    what i also want to do is write pages to various subjects, first one to come to mind is recipes.
    now i know how to add pages ... but whenever i add a subpage (or is it called a child page?), it's visible in the sidebar.
    once i have a few pages, i.e. recipes online, the sidebar will be huge.
    so, is there a way to only display the parent page (recipes), and then have that page show the links to all the subpages available?


  2. mores
    Posted 10 years ago #

    okay, i just figured out i have to fiddle with the depth thing:


    now the next challange is to display a list of child pages on the parent page :)

  3. mores
    Posted 10 years ago #

    okay, next :)
    (the "edit" button is gone, so i have to add yet another reply to my post instead of compressing it into one :(

    okay, i added the following code to my page template:

    <?php /* If this is the frontpage */ if ( is_page() ) { ?>
    <?php wp_list_pages('child_of=the_ID()&title_li=<h2>Unterseiten:</h2>' ); ?>
    <?php } ?>

    the first line is all wrong. it's supposed to display the next line only when the current page is not a child page of anything, meaning the overview page.
    how do i fix this ?

    the second line works when i use child_of=2&title blablabla
    but, i'm trying to make the whole thing dynamic, so i thought i'd use the_ID() to read the current page id. but, it doesn't like being a list_pages parameter.
    so i thought i'd use another variable like
    '$aktuelleseite = the_ID();'
    and use the $aktuelleseite with child_of.
    but that just displays the post ID in regular text, leaving out the page list.

    boohoo ...

  4. mores
    Posted 10 years ago #

    solution is simple:
    anyone who reads this should continue on here:

Topic Closed

This topic has been closed to new replies.

About this Topic