admin管理员组

文章数量:1291176

I'm trying to add tag in CUSTOM POST TYPE (news). Problem is that I dont know how. I'm not a developer of WP Theme.

I need to add it here: HERE

As you can see its a custom post type with posts, but I need to add the only to this subcategory (aktuality-z-legislativy) somewhere under heading. How can I do that ?

I'm trying to add tag in CUSTOM POST TYPE (news). Problem is that I dont know how. I'm not a developer of WP Theme.

I need to add it here: HERE

As you can see its a custom post type with posts, but I need to add the only to this subcategory (aktuality-z-legislativy) somewhere under heading. How can I do that ?

Share Improve this question asked Jun 7, 2021 at 10:59 SamM FooltSamM Foolt 11 bronze badge 6
  • Your site dosent look like wordpress, It uses some wordpress file structure but seems heavily modified. Try contacting the theme/site developer for help – Buttered_Toast Commented Jun 7, 2021 at 11:39
  • it is WordPress but the OP has chosen an unusual folder structure combined with the Autoptimize plugin. – Tom J Nowell Commented Jun 7, 2021 at 12:38
  • @samm-foolt do you know about the theme template hierarchy? You can duplicate the template and give the filename a particular name that matches that specific term so it only loads for that term, then add the banner to it, probably something like taxonomy-news_category-1849.php – Tom J Nowell Commented Jun 7, 2021 at 12:39
  • @TomJNowell thank you I solved this problem as you wrote and its working :) – SamM Foolt Commented Jun 9, 2021 at 9:42
  • can you post what you did below as an answer? I can't upvote and give you points for a comment – Tom J Nowell Commented Jun 9, 2021 at 11:28
 |  Show 1 more comment

1 Answer 1

Reset to default 0

Solution: I duplicated taxonomy.php template in theme folder and named it taxonomy-news-business.php then I edited the code inside this template

So the result is that now all posts in CUSTOM POST TYPE with slug news with category businesss are displayed according this template because taxonomy template hierarchy in WordPress is taxonomy-{taxonomy}-{term}.php

本文标签: Custom post type templateadd banner under heading