And, the WordPress CPT category for “Sports” seems to be the only CPT that is having this problem
]]>I’m using JNews WordPress theme and I would like to customize the Category pages to display Sub-Categories rather than posts, after doing a lot of research, I don’t think that functionality is part of the theme. I did come across the following information in the posted image but I am not sure how to go about implementing this. I’m very new to WordPress and development. Any help would be much appreciated!
I’m looking to build sections in the Categories and Sub-category pages.
/***Info Provided by JNews Team**
************************************/
add_filter(‘the_category’,’check_category’,99);
function check_category($content){
$pattern=’/\/category\//’;
$replacement=’category-‘;
preg_replace ( $pattern , $replacement , $content);
return $content;
}
]]>I there a way to set up this widget so it dynamically only shows the subcategories from the current parent category?
For example:
I have categories 1, 2 and 3
Inside 1 i have a, b and c
Inside 2 i have d, e and f
Inside 3 i have g, h and i
So, when im in category 1 i want the widget to show only sub categories a, b and c. Snd the same for the rest of the categories.
Thanks!
]]>Use case: A directory of business listings with deep category structure. Listings are assigned to some of those deep categories, but not necessarily to the root categories.
When providing cat=”1″, can I somehow (perhaps with a hook) expand the category selection to 1 plus the whole branch of children and grand-children?
]]>So if you click on “for women” you will see all the “for women” products (and keeping the sub directories there as well)
I will do the same for my “for men” nav bar category.
I don’t know if i have confused you, I’m good at that.
Thank you
Kevin
So my questions are:
Is content that shows in the parent category and also in the sub-category duplicate content because the parent and sub are showing pretty much the same content.
And the second question is if you have the category index setting to YES on Yoast SEO are the sub-categories also indexed or does Yoast apply the noindex tag on sub-categories.
Thanks in advance
Regards Dexter
All sub categories are set up as sub-categories under the same main category and there is no difference in how each post is ordered into sub-categories.
Here’s the setup for the categories:
Main category
– sub a
– sub b
– sub c
– sub d
– sub e
//Hanna
]]>