Jump to content
Sign in to follow this  
gyoery

Category view - menu item - current

Recommended Posts

gyoery

When viewing categories within my blog, the menu item Blog looses the .current-menu-item class. What can I do, so that the navigation on BLOG stays when viewing the categories or search results? Help is appreciated

Share this post


Link to post
Share on other sites
Rob
I'm afraid that once you click on a category or conduct a search, you're no longer on the Blog page and thus the menu's CSS is going to change. I don't believe that you can properly assign the Blog menu item to remain active in a category or a search result. Of course, I could be wrong about that, but if it is possible, it would take one of our pros to do it. I did research it a bit and found http://csscreator.com/node/29953 but I can't seem to find any reference that allows you to create an active state unless you're actually on the corresponding page. Breaking the code, I fear would be the result, and that's why I recommend a pro in this case. If you create a structure that allows categories or search results to have an active state for the Blog menu item, it might change other things. So extreme care must be taken to get this right, if it's even possible.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gyoery
Ok, let's say category and search is understandable (though I believe it would only be logical): When I am on my blogpage, and clicking through the "Previous Posts" on the Pagination, I am leaving the BLOG as well. Now that just simply is not logical as I am still supposed to be on the blog page, I would expect the Menu to still be active. Is my logic wrong, or was that just not taken into consideration?

Share this post


Link to post
Share on other sites
Danny
Hi Gyoery, In your child themes style.css line 354 you have the following: [code]#nav li.current-menu-item{ }[/code] Try adding your Background CSS gradient to it and see if that works.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
gyoery
obviously it does not work, as the menu item does not have the current-menu-item class, as soon as I navigate away from the blog page. Even if that is to page 2 of the blog. I mean, thanx for looking at the source code, it's more than most supporters do, but just above that I have [code]#nav li.current-menu-item a, #nav #menu-navigation .current-page-ancestor a { background-color: #EEEEEE; color: #007A2D !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EEEEEE', endColorstr='#BBBBBB') !important; /* for IE */ background: -webkit-gradient(linear, left top, left bottom, from(#EEEEEE), to(#BBBBBB)) !important; /* for webkit browsers */ background: -moz-linear-gradient(top, #EEEEEE, #BBBBBB) !important; /* for firefox 3.6+ */ background-image: -webkit-linear-gradient(top, #EEEEEE, #BBBBBB); background-image: -ms-linear-gradient(top, #EEEEEE, #BBBBBB); background-image: -o-linear-gradient(top, #EEEEEE, #BBBBBB); } [/code] which would work, if yours would. The Problem is not that my css is messed up, the problem is, that the current-menu-item class is only available on the first blog page. That's it.

Share this post


Link to post
Share on other sites
Jenny
PageLines uses the default WP menu styling. You can read over their codex here: http://codex.wordpress.org/Dynamic_Menu_Highlighting

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
gyoery
@simple_mama I do understand that you have to answer to the comments, but please do understand that posting links to pages I most probably have seen b4 is not much of a help. I do know how to use google and I know where to find the PL docs. Then again, the PL Docs are not always complete, e.g. Mediawiki integration > changing DEFAULT skin. I understand that you are trying to be helpful, but the gist of your last few answers on my questions was either: "This is too complex for the support forum, contact a pro" or: "It is a wordpress/plugin issue, contect wp or plugin author" or: "Look at the docs" And I don't think I am asking for magic aswell... I simply want the user to see that he is on the blog, even when viewing the second, third or fourth page. So in future, if you are tempted to post a variation of one of the above mentioned answers, just don't. If you have to, post an empty reply. That saves yours and my time and nerves. Don't take this personal, please. It is just realllllyyy annoying... almost as annoying as Rangelone saying something CAN'T be done and closing my post, even though it can be done and has been solved.

Share this post


Link to post
Share on other sites
Rob
Gyoery, I'm sorry to contradict you BUT, simple_mama's doing her job correctly. What you're asking for here is not standard support and is a customization which is not supported in the forum. She's correct in advising you, in this and some of your other prolific topics, to hire a pro for customization. We say that to anyone who's seeking customization that goes beyond fixing things that are actually broken. It is also our job to guide people when seeking customizations to places where they can learn to do these things themselves as it is not our task to design anyone's site. Going back to your question of logic, it is flawed. The menu is not static and thus when you use any other navigation, you are changing the global page, not just the content area. The menu will change and thus any active state will change. Is this changeable? Possibly. However, it is not a supported activity or service. I agree with simple_mama - hire a pro.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gyoery
well, I guess u are saying, when u are on the second page of the blog, you are not actually on the blog. This is only true for the blog, as for pages we do support ancestors. This is not actually something that is broken, its supposed to be like that. Sounds not logical to me, but ey... PS: I know she is doing her job. I am absolving her of her duty when her answers are one of the previously mentioned (in my posts only obvia)

Share this post


Link to post
Share on other sites
Danny
Gyoery, I have just created a test menu and I am able to see the current styling for my blog page 2. After looking closer at your website, I think the issue may be that you have your blog page set as your homepage, is this correct ? What I mean is you have on Settings > Reading > Static Front Page and Post Page both set to your blog page?

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
gyoery
I have this activated: "Front page displays > Your latest posts" could you send me a link to your working example? Or is it offline?

Share this post


Link to post
Share on other sites
Jenny
@gyoery On my test site, I have my Reading Settings set up exactly as yours. If you visit my site and navigate through additional pages (previous entries), you will see that the "Home" navigation remains highlighted. http://jen.staff.pagelines.com/ I am using my Simple CSS Lite plugin on this site, however it also works with the plugin disabled.

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

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  

×