• Hi there y’all,
    im using wp_list_pages('sort_column=menu_order&title_li='); to display all my pages. Now i want to get my subpages floding via javascript. The subpages are displayed like this:

    <ul>
    <li class="page_item"><a href="#" title="title1">subpage1</a>
    <li class="page_item"><a href="#" title="title2">subpage2</a></ul>

    How do i get id="tocinside1" style="display:none;"
    to that <ul> so i have got this code:

    <ul id="tocinside1" style="display:none;">
    <li class="page_item"><a href="#" title="title1">subpage1</a>

    Is there any possibility via the wp_list_pages-Tag?

    Thanks in advance, best wishes from Germany,
    saucer

Viewing 1 replies (of 1 total)
  • Assign an id to the very first ul. The one before <?php wp_list_pages(); ?>, like <ul id=”mypages”>.

    this css

    #mypages li ul li {
    display:none;
    }

    should hide the sub-pages

Viewing 1 replies (of 1 total)

The topic ‘adding javascript to wp_list_pages’ is closed to new replies.