Show only Primary Category in post

Posted in: Newspaper
Post count: 52

Hi¡

Is there a way in the post, only the primary category appears, even if you have multiple categories selected? I just want to show the primary category, but all categories of the post appear to me.

Thank you

Post count: 23312

Hello gcamara,

Unfortunately, our theme does not have any such an option that allows you to display only the primary category on posts, sorry! If you want to display more levels in our theme and if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!

Thanks for your understanding!

Post count: 52

Hello Catalln

Can you tell me which parameter to pass to show only the primary category? I have looked at td_module.php from the child theme, but I can display the primary category.

Thanks for the help.

Post count: 23312

Hello gcamara,

I suppose that you want to have the similar functionalities as the modules where is displayed only the Primary Category. So, if you want to achieve the same behavior for posts, you should edit the td_module_single_base.php and replace the get_category function with the get_category function from modules which is located in td_module.php like this -> https://www.screencast.com/t/LAdwV4OA5ER and place it instead this -> https://www.screencast.com/t/d5gJUZkNQfs and then you should use a bit of CSS code for a better design.

The code is ->

.td-post-category{
display:table!important;
}

The result is here -> https://www.screencast.com/t/CMLnUIEi0J

Hope this helps!

Thanks for your understanding!

Post count: 52

Hi Catalln

Thanks for you help¡¡¡

😉

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.