Combine multiple categories in one Menu item
I really like the new function to add a category to the menu bar. But what I really like, is to the function to combine 2 categories to one menu link.
for example: the category White and the Category Rabbits, so you can make a link called: "white rabbits" and the user gets a list of all white rabbits.
You'd have to make a custom link for that.
Make your URL http://www.example.com/?cat=(id-white),(id-rabbit)
Ipstenu, what other query objects can be accessed via url like 'cat'?
I'm asking because I was actually thinking about building a plugin that would enable to query posts using url (like /?author=1,2&cat=-4).
Also, the code which makes 'cat' parameter in url possible, do you know where it is located in core?
shazdeh - Not a clue where that's in core. I'd email the wp-hackers mailing list to ask about that one, though :)
and how would you do it when you change the permalinks? I changed the permalinks to http://www.example.info/2012/02/example-post/
For a non programmer its still pretty hard... ;)
Changing permalinks does not effect the functionality of http://www.example.com/?cat=(id-white),(id-rabbit)
Really, it'll work no matter WHAT your permalinks are :)
ok, but now I get all the white and all the rabbits, I only want the white rabbits...
Use a + instead of a , if you want only posts in both.
This also work with pretty permalinks:
What I want is a way to programattically generate a link to two categories that way. I know I can use ?cat=, but I'd rather have a core function take care of it.
This has nothing to do with Accessibility.
RSS feed for this topic
You must log in to post.