Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m not sure how to use PHP to accomplish this

    You need CSS – not PHP. However, if you;re using wp_list_pages, you can’t isolate a single link and give it a different class depending upon whether it has sub-pages or not. The best you can do it is style on .page-item-11.

    Thread Starter Spencer Hill

    (@ws5f3dj7)

    So you’re suggesting I target the exact element?

    The only problem with that is if the user creates additional pages then that CSS would have to be updated.

    Unless I’ve misunderstood your solution?

    I agree. It’s not a good solution but I don’t see any other way to style that 1 link.

    Thread Starter Spencer Hill

    (@ws5f3dj7)

    Okay, I guess I’ll stick with that for now. There’s got to be a way to say “if depth is 0, or has no children”. I just don’t know how to write that statement I guess.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to say “if sub depth is greater than 1”, need help…’ is closed to new replies.