• Resolved xtra

    (@babypress)


    Hi there, I have been trying to nut this out but get stuck on why the code sends back my list items with a class=”page_item page-item-2?

    I have coped my sidebar code that displays the list and the code that gets outputted by wordpress?

    Any suggestions to get a clean
    <-li> output <-/li>
    without the class=”page_item page-item-2 as shown below?

    <div id="nav">
    <ul>
    <?php wp_list_pages('title_li='); ?>
    </ul>
    </div><!-- end nav -->

    This is what the output looks like

    <ul>
    <li class="page_item page-item-2"><a href="https://help.com.au/?page_id=2" title="About">About</a></li>
    </ul>

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’d like to know why the output is a problem for you.

    it validates, it gives you options, but you don’t have to use them, so why is it causing you trouble? – often people focus on the wrong thing to fix, which I think is what you’re doing here.

    I asked this of someone the other day, and he immediately turned into a spastic, so I hope you don’t take it the wrong way but:

    What do you REALLY want? – choking this output can’t be it.

    Thread Starter xtra

    (@babypress)

    Problem is that my css has no effect for `#nav ul li a:hover{
    color: #CD1041
    }`

    But I will research it some more

    it could be a case of nested ULs…

    try #nav ul li ul li a:hover

    I find that once you get specific, you have to be really specific.

    you could also try .page_item a:hover (which is why the page_item is there).

    Thread Starter xtra

    (@babypress)

    Thanks Ivovic, I checked for nested ul li but that is not a problem. I will do some more research on the matter

    did you try .page_item a:hover?

    Thread Starter xtra

    (@babypress)

    I had to be super specific and with your help this works now with the following:
    #nav ul li.page_item a:hover

    Thanks heaps

    I’ve got a few specific ones in my style sheet as well. For some reason well-nested classes sometimes don’t activate unless you’re extremely explicit.

    Anyway, I’m glad you sorted it out in lieu of hacking the core code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Removing generated class in the page list menu’ is closed to new replies.