简体   繁体   English

标签页重定向到主页

[英]Tag Page Redirecting to Home Page

We have some posts on our Wordpress website and we wanted to put tags on the bottom, so I used: 我们在Wordpress网站上有一些帖子,我们想将标签放在底部,所以我使用了:

<p><?php the_tags(); ?></p>

And it worked sort of. 它的工作原理。 The problem is it links to for example: 问题是它链接到例如:

http://website.com/tag/foo http://website.com/tag/foo

But that just shows the home page (/tag/foo doesn't exist). 但这只是显示主页(/ tag / foo不存在)。 How do I get my tags to list articles/posts with that tag or some sort of search/category view? 如何获得我的标签以列出具有该标签或某种搜索/类别视图的文章/帖子?

Do you have a tag page set in your theme? 您的主题中是否设置了标签页? It sounds like its defaulting to the index.php. 这听起来像是默认的index.php。 See the order here, #5 is index.php: http://codex.wordpress.org/Tag_Templates . 请参阅此处的顺序,#5是index.php: http : //codex.wordpress.org/Tag_Templates

Do you have a tag.php file? 你有一个tag.php文件吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM