html - Wordpress Navigation - Active Styling (CSS) -


on the website I'm working on

I have your theme in a WordPress theme Has changed, and I'm not completely sure how my navigation works in the same way.

On the previous version, located at ryanbenson.info, different pages have called for various CSS documents, are fading in navigation.

** Keep in mind that there are navigation images, as you get top after hovering

Now when CSS and header documents are standard for the whole site, I do not know Know about how to style it.

This depends on how you are working, but this is a common solution :

  1. Check the current URL.

  2. If that link is for that URL, then apply the class from which it is faded.

It looks like this menu WordPress menu is cooked in your headers instead of using any of the functions, so if your code looks something like this:

  & lt; A href = "/" & gt; Home & lt; / A & gt; & Lt; A href = "about /" & gt; About & lt; / A & gt; & Lt; A href = "/ work" & gt; Work & lt; / A & gt; & Lt; A href = "/ contact" & gt; Contact & lt; / A & gt;  

You'll love something instead:

  & lt; A & lt ;? = Is_home ()? 'Class = "current_page"': ''? & Gt; Href = "/" & gt; Home and lt; / A & gt; & Lt; A & lt ;? = Is_page ('About')? 'Class = "current_page"': ''? & Gt; Href = "/ about" & gt; About & lt; / A & gt; & Lt; A & lt ;? = Is_page ('work')? 'Class = "current_page"': ''? & Gt; Href = "/ work" & gt; Work & lt; / A & gt; & Lt; A & lt ;? = Is_page ('contact')? 'Class = "current_page"': ''? & Gt; Href = "/ contact" & gt; Contact & lt; / A & gt;  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -