Categories menu item formatting
-
I have created a template using Artisteer 2 and wanted to add a Categories drop-down menu item to the hoizontal menu under the header. I have been able to add the Categories menu item just fine, but it is not accepting the formatting of the other menu items (text should be white, not black; hover should be yellow, not gray). The submenu items are formatted correctly though. The other menu item that work correctly are all pages.
How do I get the added menu item to accept the formatting of the other menu items.
Here is the code I used to insert the Categories menu item:
<div class="art-nav"> <div class="l"></div> <div class="r"></div> <ul class="art-menu"> <?php art_menu_items(); ?> <?php wp_list_categories(); ?> </ul> </div>Thanks a lot!
-
A link to your site might help…
Sorry about that. http://www.22photography.com/blog
I would also like to know how to insert my search bar into the menu as well, but that may be a bit over my head. If you have an easy way, I’m all ears!
Try changing:
.art-menu a .t { color:#FFFFFF; font-family:Tahoma,Arial,Helvetica,Sans-Serif; font-size:12px; font-style:normal; font-weight:normal; line-height:24px; margin:0 0; padding:0 22px; text-align:center; }to
.art-menu a .t, .art-menu .categories { color:#FFFFFF; font-family:Tahoma,Arial,Helvetica,Sans-Serif; font-size:12px; font-style:normal; font-weight:normal; line-height:24px; margin:0 0; padding:0 22px; text-align:center; }in style.css
To add the search form, try adding
<li><?php get_search_form(); ?></li>immediately after<?php wp_list_categories(); ?>.I would ALSO like to add a category list to my menu bar with a theme I created in Arteseer.
WHERE do you insert the code that you used (will)
and where to do change the code as described in esmi post
Here’s an even easier solution I just figured out.
Open the functions.php file and find the art_menu_items() function.
copy this:
wp_list_categories('title_li=<a href="#" title="Categories"><span class="l"></span><span class="r"></span><span class="t">Categories</span></a>');and paste it in above the two add_action lines, and bingo. You’ve added one line. Now you have a fully functional and theme integrated categories menu. 🙂
You don’t need to mess with the style sheet, or header.php or any other file. Just one line in functions.php. Much easier to add back in if you update your template. 🙂
The topic ‘Categories menu item formatting’ is closed to new replies.