WordPress.org

Ready to get started?Download WordPress

Forums

single.php & dynamic menu question (2 posts)

  1. Silvetti
    Member
    Posted 6 years ago #

    Hi there,

    I currently have a single.php page that uses 2 loops - one to display regular posts and one to display a specific category post. Now I need to have my specific category post to be displayed under the menu tab of 'gigs' but currently it displays under my archive page tab 'news'.

    Here is my current menu code:

    <ul>
    	<li <?php if ( is_page(home)) { echo 'class="current_page_item"';} ?>><a href="<?php bloginfo('siteurl'); ?>" title="Take me back home">Home</a></li>
    	<li <?php if ( is_page("archive") || (is_page("archive-2") || (is_single()))) { echo 'class="current_page_item"';} ?>><a href="<?php bloginfo('url'); ?>/archive/">News</a></li>
    	<li <?php if ( is_category("9") || (is_page("gigs") || (is_single("live-review")))) { echo 'class="current_page_item"';} ?>><a href="<?php bloginfo('url'); ?>/gigs/">Gigs</a></li>
    	</ul>

    Is there a way to display under 'gig' and not 'news' when I click on a category post for ID9?

    Many thanks

  2. totalbigbrother
    Member
    Posted 5 years ago #

    Im also looking for the exact same thing.
    Has anybody got a solution?

    Thanks..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags