Jump to content


Photo

wordpress navigation problem


  • Please log in to reply
5 replies to this topic

#1 dianikol85

dianikol85

    Advanced Member

  • Member
  • PipPipPipPip
  • 126 posts

Posted 30 October 2010 - 08:26 AM

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
  • 0

#2 Andrea

Andrea

    Advanced Member

  • Moderators
  • 5,718 posts
  • Facebook:https://www.facebook.com/aandbwebdesignAB
  • LocationSan Antonio, TX

Posted 30 October 2010 - 08:51 AM

Check your CSS - the current page appearance can be controlled by

.current_page_item a {

}
  • 0

#3 dianikol85

dianikol85

    Advanced Member

  • Member
  • PipPipPipPip
  • 126 posts

Posted 30 October 2010 - 10:02 AM

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.
  • 0

#4 Andrea

Andrea

    Advanced Member

  • Moderators
  • 5,718 posts
  • Facebook:https://www.facebook.com/aandbwebdesignAB
  • LocationSan Antonio, TX

Posted 30 October 2010 - 10:59 AM

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.
  • 0

#5 dianikol85

dianikol85

    Advanced Member

  • Member
  • PipPipPipPip
  • 126 posts

Posted 30 October 2010 - 11:23 AM

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...
  • 0

#6 Andrea

Andrea

    Advanced Member

  • Moderators
  • 5,718 posts
  • Facebook:https://www.facebook.com/aandbwebdesignAB
  • LocationSan Antonio, TX

Posted 30 October 2010 - 12:52 PM

Maybe some of our Wordpress Experts will be by soon.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users