最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

permalinks - Dynamic Template file for subpage

programmeradmin0浏览0评论

.php is template file for showing posts of any post_tag.

- I want to show description of post_tag taxonomy term.

how can I do this in WordPress.

Edit

I think you did not understood my question. actually i want to convert this:-

into

https://www.example/tag_name-tag.php is template file for showing posts of any post_tag.

https://www.example/tag_name/about - I want to show description of post_tag taxonomy term.

how can I do this in WordPress.

Edit

I think you did not understood my question. actually i want to convert this:-

https://www.example/tag-name?content=about

into

https://www.example/tag-name/about

Share Improve this question edited Mar 21, 2019 at 7:09 bueltge 17.1k7 gold badges62 silver badges97 bronze badges asked Mar 20, 2019 at 15:50 A'dii SunlayA'dii Sunlay 213 bronze badges 4
  • Have you put an actual tag_name-tag.php in your root folder? WP already has tag archives, is it that you want to show your own template on the tag archives? Take a look at the template hierarchy, and avoid standalone PHP files that the browser directly accesses like the plague – Tom J Nowell Commented Mar 20, 2019 at 17:09
  • i think you did not understood my question. actually i want to convert this:- example/tag-name?content=about into example/tag-name/about – A'dii Sunlay Commented Mar 20, 2019 at 18:28
  • hmmm where does example/tag_name-tag.php come from? Where does ?content=about come from? There's no code in your question can you include what you're currently doing in the question so that we might understand? – Tom J Nowell Commented Mar 21, 2019 at 1:42
  • actually i want permalink structure like facebook facebook/username/about facebook/username/posts facebook/username/photos facebook/username/videos facebook/username/reviews – A'dii Sunlay Commented Mar 21, 2019 at 10:03
Add a comment  | 

1 Answer 1

Reset to default 0

The taxonomy term should helps you, see the documentation.

The possibilities

  • taxonomy-{taxonomy}-{term}.php
  • taxonomy-{taxonomy}.php
  • tag-{slug}.php
  • tag-{id}.php

Your example

  • tag-about.php

See the template hierarchy for tag for a deeper documentation about this feature. So it is possible to have a specific template without coding, a plugin.

发布评论

评论列表(0)

  1. 暂无评论