[英]Link to users blog posts wordpress
我想在模板上添加一個鏈接,以鏈接到用戶自己的博客文章,我嘗試使用的代碼是<li><a href="?author=<?php the_author_ID(); ?>">test</a></li>
。
編輯,此處的代碼有錯別字,帶您進入的URL只是?author=
您是不是要只在URL中打印數字。 只需回顯the_author_ID()。
<li><a href="?author=<?php echo the_author_ID(); ?>">test</a></li>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.