When I click on a link for example https://hokkaido.a4jp.com/category/en-beaches+en-free/ I get the first category "beaches" in the title but how do I get 2 keywords or more.

<?php single_cat_title(''); ?>
<?php single_cat_title('Category: '); ?>

single_cat_title > multiple_cat_title

I have custom posts with custom categories (custom taxonomy).

Now I want to create a page (category.php) where posts from two categories are listed in the title H1 area.

The standard function used to list the current category is:

<?php echo single_cat_title(); ?>

This works great but only when the page is: domain.com/custom-taxonomy/category-name/

When the domain is: domain.com/category/category-name+another-category-name/ the category is only "category-name".

When I use:

<?php wp_list_categories(); ?>

All categories that has posts are listed but I can't find any code to just list all the categories in the category.php file h1 title.

Is there a function that would do just:

multiple_cat_title(); Some extra info: The custom taxonomies are: museums and free. I want to show "Free + Museums (26)" when people visit the URL:




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.