【发布时间】:2022-08-14 09:19:43
【问题描述】:
由于标题代表我需要的内容,我想在特定类别的内容之后为每个帖子添加一个链接。喜欢\"欲了解更多详情,请转到https://stackoverflow.com/\" 我该怎么做?谢谢。
标签: wordpress
由于标题代表我需要的内容,我想在特定类别的内容之后为每个帖子添加一个链接。喜欢\"欲了解更多详情,请转到https://stackoverflow.com/\" 我该怎么做?谢谢。
标签: wordpress
您可以使用in_category() 来检查类别并输入您想要的任何内容:
if ( in_category('name or slug here') ) :
echo 'For more details go to <a href="https://stackoverflow.com/">Stack Overflow</a>';
endif;
您可以在 single.php 文件中的 the_content() 之后添加它。
【讨论】: