• alfie

    (@drtanz)


    I would like to generate a list of pages on my site in the following format

    [please use backticks or the code button to mark your code]

    <ul class="menu">
    
    <li><h3>Top level item</h3>
    <ul>
    <li>Second level item</li>
    <li>Second level item</li>
    </ul>
    </li>

    As you can see it is not only a question of adding a depth of 2, the problem lies in the fact that I want an H3 only for top level items, how can I do this? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • stvwlf

    (@stvwlf)

    Try generating the H3 at all levels and then hide displaying H3’s at the lower levels.

    I think this will do it.
    ul.menu ul h3 { display: none; }

    Thread Starter alfie

    (@drtanz)

    That would hide the whole element though, sorry I was a bit unclear, inside the h3 I have link which must be shown

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