• I want to use background images for my page navigation instead of the text provided by WP. How do I hide the page titles, but, obviously not the pages. Ideally I would like to wrap the text in a span class or something to hide just the text within the <a tag and use the </a><a> tag for over states.

    https://oursubtledecay.com/wordpress/

Viewing 1 replies (of 1 total)
  • Use this format for your nav instead of wp_list_pages:

    <ul>
    <li>
    <a <?php if (is_page('home')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>"><span class="navtext">Home</span></a>
    </li>
    <li>
    <a <?php if (is_page('services')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/services/"><span class="navtext">services</span></a>
    </li>
    <li>
    <a <?php if (is_page('about')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/about/"><span class="navtext">about</span></a>
    </li>
    </ul>

Viewing 1 replies (of 1 total)
  • The topic ‘how to hide the page titles from navigation’ is closed to new replies.