change current page menu colour and add portfolio-type title
-
I have searched through this forum for days and googled and tried everything I could find, but I can’t figure this out. I have used the element inspector and tried every combination of remotely relevant class and id elements, to no avail.
1. Can I change colour of the currently-selected menu item? For example, when on the main (Services) page of my site, the menu text is currently grey. I would like to know how to change that.
2. Searching through this forum I found how to remove the “Archive” title when clicking on my portfolio. In my site, Client Projects are my portfolio. I have defined three project types and added them to a sub-menu. When I go to Locator Maps under Client Projects in the menu, I have hidden the Archive title but would like to know if it’s possible to display the selected project type. In this case, is it possible to display Locator Maps in the title? Similarly, if I select the Reference Maps project type, can the page show the Reference Maps project type as a title?
I hope I’ve made this clear enough. If anyone needs more information, let me know. I’ve struggled with this for quite a while.
The blog I need help with is: (visible only to logged in users)
-
I would also like to know how to remove the underline when hovering over links. I added `text-decoration: none’ to a:hover but it doesn’t seem to be working
-
You can change the current page menu colour using this code:
.main-navigation li.current_page_item a, .main-navigation li.current-menu-item a { color: #000; }For the second bit there isn’t a great way to do this in your theme, it’s possible but it will mean people using screen readers will still “see” the original title and it might mess with the formatting a little. You’ll need to get rid of your existing code to hide the archive page titles then use this instead:
body.archive .page-title { visibility: hidden; } body.term-city-tourist-maps .page-title::before { content: "City & Tourist Maps"; visibility: visible; } body.term-locator-maps .page-title::before { content: "Locator Maps"; visibility: visible; } body.term-reference-maps .page-title::before { content: "Reference Maps"; visibility: visible; }It basically makes the original title invisible then adds in an alternate one for each of the different pages you have.
-
Thank you! I am trying a different theme that may solve my second issue, but in case it doesn’t thanks for the workaround.
Julie
- The topic ‘change current page menu colour and add portfolio-type title’ is closed to new replies.