WordPress.org

Support

Support » How-To and Troubleshooting » wp_list_pages & custom classes for navigation menu

wp_list_pages & custom classes for navigation menu

  • Is there anyway I can use in wp_list_pages in conjuction with an image based navigation menu? (The actual li text is hidden, and replaced with an image)

    For the moment, my hand generated nav.php menu looks something like the below. But this means I can’t have current_page_item included for the current page, as you can when using wp_list_pages.

    So… is there any way to modify wp_list_pages so that it includes my classes (n-home,n-products, etc) and highlights the current page?

    Or is there an easier way to do this?

    <ul>
    <li class="n-home"><a href="/home/" title="Home">Home</a></li>
    <li class="n-products"><a href="/products/" title="Products">Products</a></li>
    etc
    etc
    </ul>

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_list_pages & custom classes for navigation menu’ is closed to new replies.
Skip to toolbar