This is a second navigation menu I’m using:
<ul id="forums">
<?php $custom_posts = new WP_Query(); ?>
<?php $custom_posts->query('post_type=bbp_forum'); ?>
<?php while ($custom_posts->have_posts()) : $custom_posts->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</div><!-- #access -->
Is a custom loop which list a custom post type called Forum.
I would like to highlight the current Forum link, like this:
Any suggestions?
So, if I understand correctly, when you’re on a single post page, you want to have a navigation menu with all the posts of post_type bbp_forum.
I had a similar case (without the post_type, but it’s not a problem to add it), and I used code that I found that talked about posts of same category, on single post pages.
The code goes as follows (with customization for post_type):
I hope that’s what you meant.
P.S – I also see that you have an opening <ul> tag, but a closing <div> tag….