Support » Fixing WordPress » wp_list_pages indent

  • I tried adding wp_list_pages to my theme. Sub-pages are not getting indented. I realize this is a CSS issue, but I really don’t want to mess with the CSS and take the chance of messing something else up. I’m wondering, is there a trick I can use to “force” sub-pages to indent?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Nope

    OK, after I wrote my post I realized I did not provide nearly enough info. So, here it is –

    I have a “special” page that has sub-pages. I wanted to display them in the sidebar – separate from other pages – like this:


    I first used


    but the only page I got was the top page. I then tried


    which listed the page and sub-pages, but did not indent them.

    So, how can I get to my goal?

    Ah crap, the formatting got messed up. The goal is

    Parent page
    – Child
    – Child
    – Child

    without the ‘-‘ in there.

    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
    $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    if ($children) { ?>
    <?php echo $children; ?>
    <?php } ?>

    might achieve something

    Thanks, I’ll try that

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp_list_pages indent’ is closed to new replies.