I am filtering posts by two categories, using the following style of query:
which gives a list of all posts that are in the animals category and in the blue category.
I want the resulting page to display the names of the two categories, as in "Animals and Blue", as a header over the list of excerpted posts.
My theme has an option to display the category title, which it pulls from single_cat_title(). But for two-category searches, this gives only the first of the two categories, as in "Animals."
I'm trying to figure out a way to modify my theme to display also the second category, when there is one. But I can't figure out where Wordpress keeps the information.
Does Wordpress save the title of the 2nd category anywhere? Is there a way to dig it out from somewhere? Can anybody help? Many thanks in advance.