WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] subpages invisible

[Resolved] subpages invisible

  • 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?

    thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • okay, i just figured out i have to fiddle with the depth thing:

    http://codex.wordpress.org/Template_Tags/wp_list_pages

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

    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 …

    solution is simple:
    anyone who reads this should continue on here:
    http://wordpress.org/support/topic/55192?replies=8

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] subpages invisible’ is closed to new replies.