Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Basically I need a custom menu consisting of two level. Top level will consist of available categories, possibly with added feature that each category name is follow by the number of posts in that particular category, ie. Articles (37). The second or bottom level will consists of all unique tags relevant to that particular category. I'd very much like to visualize this, but I'm an idiot with this interface. No matter what I try to do, I seem to fail, so I'll do it the html way.

<ul id="menu">
    <li class="category">
        cat1
        <ul>
            <li class="tag">tag1</li>
            <li class="tag">tag2</li>
            <li class="tag">tag3</li>
        </ul>
    </li>
    <li class="category">
        cat2
        <ul>
            <li class="tag">tag3</li>
            <li class="tag">tag7</li>
            <li class="tag">tag14</li>
        </ul>
    </li>
    <li class="category">
        cat3    
        <ul>
            <li class="tag">tag2</li>
            <li class="tag">tag8</li>
            <li class="tag">tag14</li>
        </ul>
    </li>
<ul>

Of course each category and tags will be a link. Category links will list post it that specific category, just as we know it, however tag links will list post featuring the tag, but only those listed in the relevant category of course.

That pretty much sums it up I think.

I've tried on my own, but I'm going nowhere fast, so any help will be very much appreciated.

Best regards

share|improve this question
    
Tags aren't specific to a category, they're specific to posts, the same with categories, there is no association between a tag and a category aside from when they're both assigned to the same post, the query you'd need won't be light. Perhaps something from this previous discussion will help. –  Mark Duncan Jul 28 '11 at 19:19
    
Let say I write a post in category "tutorials" and add tags "Wordpress" and "CMS". The two tags will the appear in the "tutorials" sub menu. That don't mean that they are specific to that category. I may vary well write a post in another category using the same tags, same deal, only the links will work differently affectively listing posts in a specific category making use of a specific tag. –  Zacariaz Jul 28 '11 at 19:48
add comment

1 Answer

Are you familiar with the wp_nav menu?

You could achieve what you are asking using the wp-nav menu, but the categories, pages, etc. would have to be organized manually via the WordPress Menu Interface in the WP-Admin screen.

If you are OK with arranging them manually via drag-n-drop, let me know and I'll instruct you on adding this function to your theme.

share|improve this answer
    
Arranging the top level manually is not a problem as I'll be working with a limited number of categories, but the second level is more complicated. If I chose to post in a specific category, the tags I use should be listed automatically of course. I'm not quite sure how wp-nav can achieve this, but if you're sure, of course I'll investigate further. –  Zacariaz Jul 28 '11 at 19:19
    
Just messed around with the interface a bit, and I see no way of achieving my goal. Adding the categories is of course easy, but that's about it. –  Zacariaz Jul 28 '11 at 19:26
    
The tags would have to be added manually. They're available by selecting the check-box in the screen options menu. I don't know of a way to add them automatically, but if I find a way I'll post it. –  Jeremy Jared Jul 29 '11 at 19:54
    
I don't see any option to do it manually, but it doesn't matter really, as it will have to be done automatically. Hopefully I'll have the problem solved during the day tomorrow, with the help of a buddy of mine who have a whole lot of experience with this than me. –  Zacariaz Jul 29 '11 at 21:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.