Forums

Categories menu item formatting (7 posts)

  1. will.r.robinson
    Member
    Posted 2 years ago #

    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!

  2. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    A link to your site might help...

  3. will.r.robinson
    Member
    Posted 2 years ago #

  4. will.r.robinson
    Member
    Posted 2 years ago #

    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!

  5. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    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(); ?>.

  6. realive1
    Member
    Posted 2 years ago #

    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

  7. zacpod
    Member
    Posted 2 years ago #

    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. :)

Topic Closed

This topic has been closed to new replies.

About this Topic