Jump to content
Sign in to follow this  
ksnyde

Nav confuses CPT Archive with Blog

Recommended Posts

ksnyde

My top navigation has a number of links to custom post type Archive pages. Clicking on them works but it behaves poorly on the top navigation as both the "blog" and the "[CPT option]" are highlighted at the same time. Is there an easy way to avoid this?

Share this post


Link to post
Share on other sites
ksnyde
BTW, I did try removing the Blog as a standard page and re-added it as a custom page with a URL of ('/blog'). This partially worked in that it avoided the conflict above however when you to a single page of the blog it no longer highlights Blog on the nav menu (nothing is highlighted).

Share this post


Link to post
Share on other sites
catrina
The "Blog" item isn't highlighted because technically the site visitor is the viewing the single page of the blog so it will highlight that page. However, I think CSS can be used to ensure that "Blog" is highlighted while the single page is selected.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
ksnyde
Normally the "blog" item IS HIGHLIGHTED. This is the default behaviour. I was just saying that if you create a "Custom Link" to the blog then it behaves this way. My primary question is not about the blog but about Custom Post Types. Specifically, I want the CPT-type to be treated distinctly from the BLOG standard post type. Let me give an example. This [url="http://www.flickr.com/photos/14261777@N00/6930079192/"]screenshot[/url] shows what the menu looks like when I've clicked on the "Workouts". Context is: 1. "Workouts" is a custom link to "/workouts" which is where the archive page is for the CPT workouts 2. "Blog" is standard page link (falsely highlighted in screenshot) 3. "Blog Link" is a custom link to "/blog" (not highlighted in screenshot) 4. "Measurements" is another custom link to a CPT (not highlighted in screenshot) The ideal would be to have a "Page" for all CPT's just like there is one for "Blog" (which is a proxy for both archive and single pages of the default post type). Not sure how to achieve this though. I say this is ideal because it works for both single() and archive() pages. Any pointers would be greatly appreciated.

Share this post


Link to post
Share on other sites
Danny
Is this another website, as I am clicking the link in the footer of your first post and there are only two menu options?

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
ksnyde
Sorry, Danny. You have to be logged in to have this happen. I'll send you login information privately.

Share this post


Link to post
Share on other sites
Rob
Danny will likely be in early in the morning, GMT.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Danny
Hi Ken, I have just tried to login and I am getting an error message saying that the Username is incorrect. I have used the username and password you sent me via PM?

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
ksnyde
Have sent you the username and password. The other issue we're discussing is more critical to me but this one is of interest still.

Share this post


Link to post
Share on other sites
Jenny
A lot of this has to do with the way Wordpress highlights menu items. It's certainly not perfect. Have you tried installing Simple CSS Lite (link in my sig) to see if it helps?

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
ksnyde
I haven't tried Simple CSS Lite but I'm pretty comfortable with CSS and getting comfortable with LESS. Anyway, I'm going to close this issue as I think I can solve this another way.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×