How to Highlight The Current Category Parent Menu in Atahualpa Theme of WordPress

After modifying the page menu in Atahualpa theme of WordPress in order to display the highlighted or selected page parent menu at this article: How to Highlight The Current Page Parent Menu in Atahualpa Theme of WordPress, then this following modification will also do the same thing, but for the category menu. As we have known, both page and category can be included in the header menu of the WordPress theme. Therefore, in order to implement this modification, then we simply edit the css.php file belongs to the theme above.

Open your \wp-content\themes\atahualpa\css.php file, and find this code:

2449
div#menu2 ul.rMenu li.current-cat > a:link,

then before that line, please insert this following code:

2448
2449
2450
2451
2452
2453
2454
div#menu2 ul.rMenu li.current-cat-parent > a:link, 
div#menu2 ul.rMenu li.current-cat-parent > a:active, 
div#menu2 ul.rMenu li.current-cat-parent > a:hover, 
div#menu2 ul.rMenu li.current-cat-parent > a:visited {
	background-color: #<?php echo $bfa_ata['cat_menu_bar_background_color_hover']; ?>;
	color: #<?php echo $bfa_ata['cat_menu_bar_link_color_hover']; ?>;
	}

Now each time the child category menu being selected, then its parent category menu also will be highlighted or selected.

Share

914 viewsPrint This Post Print This Post

Speak Your Mind

*


*