ThemeShaper Forums » Thematic

[closed]

Show only child pages in sidebar!?

(4 posts)
  • Started 11 years ago by TheJesper
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. TheJesper
    Member

    Hi,

    I would like to do something really simple.. (Should be simple anyway).

    -How do I show ONLY the children of the current page, in the sidebar? Do I need to hack and in that case, where do I hack it :)?

    Thanks!!! /Jesper

    Posted 11 years ago #
  2. start with the codex:
    http://codex.wordpress.org/Template_Tags/wp_list_pages#List_Sub-Pages

    then adding stuff to thematic is as easy as :

    function function_name(){ ?>
       <div id="bacon">Gosh I love bacon</div>
    <?php }
    add_action('name_of_hook_you_want_to_add_function_to','function_name');
    Posted 11 years ago #
  3. TheJesper
    Member

    Hi, Maybe I was a bit unclear... The sidebare lists all pages in my site dynamically in a tree-like structure. It lists all pages on the same level as the one I am looking at as well as all of their children.

    Ho do I make it ONLY display the sub-pages of my current page?

    Thanks...

    Posted 11 years ago #
  4. uhh no- you weren't unclear. the thing listing all your pages is a widget. you can remove that widget in your dashboard and insert the function found in the codex in the manner i have illustrated.... to any of the available sidebar hooks.

    or there might be a widget that does that already. lo and behold:
    http://wordpress.org/extend/plugins/subpages-widget/

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.