• Resolved Odenberg

    (@murmelin)


    Hi!
    Im trying to put a UL of my childpages to one specific page and I want the list to show on all the childpages and any future grandchild pages.

    I´ve tried several time but I cant seem to get it right.I would be very grateful for some help and suggestions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Odenberg

    (@murmelin)

    So i finally managed on my own. But for others with the same problem; this is how I did it.

    First I created a div for the UL. Then I called the list in the index.php.

    <div id=”pages-list”>

      <?php wp_list_pages(‘child_of=9& exclude=539,540 title_li=’); ?>

    </div>

    Pages shon in the list are children to page-ID 9 and I exclude child pages with two IDs.

    Then I whent to the css. And for all the pages where I dont want the list to show; I stated this:

    body.page-id-2 div#pages-list {display: none;}

    Thread Starter Odenberg

    (@murmelin)

    Sorry, it should look like this:

    <div id=”page-list”>

      <?php wp_list_pages(‘child_of=9& exclude=539,540 title_li=’); ?>

    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘UL child pages’ is closed to new replies.