ThemeShaper Forums » Thematic

[closed]

Help with thematic action please.

(2 posts)
  • Started 10 years ago by Don1
  • Latest reply from cannobbio
  • This topic is not resolved
  1. Don1
    Member

    Hello

    I'm very new to PHP and Thematic for Wordpress. I was wondering if anyone could look at the code below and help me out?

    I would like to display the sub menu items of a page only - this code is displaying all the top level and sub level menu items on the site and I can't figure out what I'm doing wrong (I suspect something quite obvious to the trained eye)

    This is a function that I am putting into the child functions.php file

    Many thanks

    <?php
    
    function SubMenuItems() {
    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if ($children) {?>
    <ul><?php echo $children; ?></ul>
    <?php }}
    add_action('thematic_belowpost', 'SubMenuItems');
    ?>
    Posted 10 years ago #
  2. cannobbio
    Member

    I think you have to use the "depth" parameter.
    http://codex.wordpress.org/Function_Reference/wp_list_pages

    Also check out this plugin:
    http://wordpress.org/extend/plugins/list-pages-shortcode/

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.