How to get all categories on a category page (when using multiple categories)??
-
Hi there please help!
I’ve searched the internet for so long now but can’t find this info.
When on a category page ie
www.yoursite.com/category/uncategorized
it is fairly straightforward to get the category id of the current category – I can use something likeget_query_var( 'cat' )
or some other alternative.BUT
How do I get all the categories (ids, slugs anything!) when using multiple categories on the category page from a URL like:
https://www.yoursite.com/?category_name=category1+category2+category3
The category page only lists the first category name, which is not good, but the filtering is however correct!
I do not want to use $_GET or $_REQUEST, these are both surely the wrong way to do it.
Thanks for any help in advance, I am completely stuck!
- The topic ‘How to get all categories on a category page (when using multiple categories)??’ is closed to new replies.