Javascript 如何在锚定标记内进行下一个/上一个帖子链接?
我试图通过wordpress中的next_post_link()函数完成我的项目,但我想在锚定标记内完成,同时保留应用于锚定标记的样式,但根本不起作用Javascript 如何在锚定标记内进行下一个/上一个帖子链接?,javascript,php,html,wordpress-theming,custom-post-type,Javascript,Php,Html,Wordpress Theming,Custom Post Type,我试图通过wordpress中的next_post_link()函数完成我的项目,但我想在锚定标记内完成,同时保留应用于锚定标记的样式,但根本不起作用 <a href="<?php next_post_link(); ?>" class="next-project">next project</a> 我想你错过了echo。试试这个 <a href="<?php echo next_post_link(); ?>
<a href="<?php next_post_link(); ?>" class="next-project">next project</a>
我想你错过了echo。试试这个
<a href="<?php echo next_post_link(); ?>" class="next-project">next project</a>
我建议您使用任何简短的表单进行调试。例如,创建一个俯冲并显示
echo next_post_链接()代码>示例代码:
。希望它能帮助你找到问题所在。