Forums

[resolved] Newbie: Categories as a menu selection (4 posts)

  1. perdox808
    Member
    Posted 3 years ago #

    Hello everyone. I hope I am posting this in the right place.

    My blog it at http://theperdoxrant.com. The theme was generated by some software I purchased from Artisteer.

    If you visit my site, you will see that the categories side bar is quite messy. I have searched on Google for close to 6 hours now and I have not been able to find the solution to what I want to do. In fact, the Google search engine sent me an email telling to get off as I was tiring it. Just kidding.

    See the categories menu button? That's as far as I can go. Here's what I want to.

    1. I want to eliminate the Categories sidebar.

    2. I would like to have the Menu button, now called Categories, work in such a way so that when the user clicks on it they will see all the categories with their sub-categories. At the moment, I have Corporations>Horror working via empty pages.

    3. When the user lets go of the mouse once they have highlighted, say, Crap in Products, I would like the page to show all the posts that are in the Products>Crap category.

    Is this possible? I have tried many plugins (Exec-PHP, Inline Posts, Template Tag Shortcodes) all to no avail. As I have mentioned, I have searched and searched. Maybe I'm using the wrong terminlogy. I have tried 'categories to menu' etc. in Google but couldn't find anything.

    Is there a plugin that will allow me to do this with having to dig into the code of my theme?

    What would it cost me to have someone tweak my site?

    Any help would be greatly appreciated. Thanks for taking the time to read this long-winded post.

  2. Adam W. Warner
    Member
    Posted 3 years ago #

    Here's some great information about creating drop down category menus:
    http://www.catswhocode.com/blog/wordpress-magazine-style-horizontal-dropdown-menu

  3. not2bug
    Member
    Posted 3 years ago #

    I have the exact same problem. I've seen the site you referred us to, however, it doesn't work completely.

    Artisteer creates all the CSS formatting to convert the menu items and subitems. So I managed to add the categories to the menu (www.bigbulgarian.com/blog) by adding

    <?php wp_list_categories('orderby=name&exlude=181&title_li=');
     	$this_category = get_category($cat);
     	if (get_category_children($this_category->cat_ID) != "") {
     		echo "<ul>";
    wp_list_categories('orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID);
     		echo "</ul>";
     	}
    	?>

    at the end of the header.php file, right after the

    <?php art_menu_items(); ?>

    statement.

    So the header.php file looks like this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title><?php if (is_home () ) { bloginfo('name'); } elseif ( is_category() ) { single_cat_title(); echo ' - ' ; bloginfo('name'); }
     elseif (is_single() ) { single_post_title(); }
     elseif (is_page() ) { bloginfo('name'); echo ': '; single_post_title(); }
     else { wp_title('',true); } ?></title>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <!--[if IE 6]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie6.css" type="text/css" media="screen" /><![endif]-->
    <link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed', 'kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed', 'kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" /> 
    
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_head(); ?>
    </head>
    <body>
    <div class="PageBackgroundGlare">
        <div class="PageBackgroundGlareImage"></div>
    </div>
    <div class="Main">
    <div class="Sheet">
        <div class="Sheet-tl"></div>
        <div class="Sheet-tr"><div></div></div>
        <div class="Sheet-bl"><div></div></div>
        <div class="Sheet-br"><div></div></div>
        <div class="Sheet-tc"><div></div></div>
        <div class="Sheet-bc"><div></div></div>
        <div class="Sheet-cl"><div></div></div>
        <div class="Sheet-cr"><div></div></div>
        <div class="Sheet-cc"></div>
        <div class="Sheet-body">
    <div class="Header">
        <div class="Header-png"></div>
        <div class="Header-jpeg"></div>
    <div class="logo">
        <h1 id="name-text" class="logo-name">
            <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
        <div id="slogan-text" class="logo-text">
            <?php bloginfo('description'); ?></div>
    </div>
    
    </div>
    <div class="nav">
        <ul class="artmenu">
            <?php art_menu_items(); ?>
    		<?php wp_list_categories('orderby=name&exlude=181&title_li=');
     	$this_category = get_category($cat);
     	if (get_category_children($this_category->cat_ID) != "") {
     		echo "<ul>";
    wp_list_categories('orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID);
     		echo "</ul>";
     	}
    	?>
    
        </ul>
        <div class="l">
        </div>
        <div class="r">
            <div>
            </div>
        </div>
    </div>

    That does add "Photography" (one of my categories) to the menu, but it doesn't format it correctly... Also I would like to add an item "Categories" and the categories as subitems.

    Any ideas?

    Thanks a lot!!!

  4. perdox808
    Member
    Posted 3 years ago #

    Thank you for the replies. I'll give it a go but it looks like a daunting task. I am thinking of switching my theme over to the Atahualpa theme because that allows one to create the categories menu quite easily.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic