dianikol85 Posted October 30, 2010 Report Share Posted October 30, 2010 Hi , i have this issue, i am biulding a wordpress site and lets say i have two pages. Products for category A and the second page called Products for category B . The first page is the index.php of wp. In the second page i run a second loop to load the products for this particular category. So, when i am in the second page and click the read more link for a product it shows the complete post. (single.php) But navigation bar shows that i am in the first page which is the default page as i said. The question is how can i make the nav bar be highlighted the second page when i read one of the second page's product post? I hope you understand what i am trying to tell Quote Link to comment Share on other sites More sharing options...
Andrea Posted October 30, 2010 Report Share Posted October 30, 2010 Check your CSS - the current page appearance can be controlled by .current_page_item a { } Quote Link to comment Share on other sites More sharing options...
dianikol85 Posted October 30, 2010 Author Report Share Posted October 30, 2010 Well , that's not the issue. Let's see, when you view a post (single.php) the .current_page_item class is assigned to the page that i chose to be the blog page. Is there any way that when i view a post's full article from the second page, which is not the blog page, the.current_page_item class couldbe assigned to the second page?.. See my site to understand what i mean. http://easyjquery.gr/ and go to the tutorial page and view a post to see what's happening to the nav bar. Quote Link to comment Share on other sites More sharing options...
Andrea Posted October 30, 2010 Report Share Posted October 30, 2010 Sorry, can't help with that. I just checked on the WP site I'm currently working on, and when I go to a blog page, I don't have a current page marker at all - which I guess is better than one on the wrong page. However, I have no idea what causes one or the other. Quote Link to comment Share on other sites More sharing options...
dianikol85 Posted October 30, 2010 Author Report Share Posted October 30, 2010 Thank you Andrea. The only trick i came up is by using jquery. i check the category that the post belongs and if it is in the second page i use jquery to remove the class .current_page_item from the blog page and add it to the econd page. It does the trick although it has a little lag until the page is full loaded... Quote Link to comment Share on other sites More sharing options...
Andrea Posted October 30, 2010 Report Share Posted October 30, 2010 Maybe some of our Wordpress Experts will be by soon. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.