簡體   English   中英

鏈接到用戶博客文章wordpress

[英]Link to users blog posts wordpress

我想在模板上添加一個鏈接,以鏈接到用戶自己的博客文章,我嘗試使用的代碼是<li><a href="?author=<?php the_author_ID(); ?>">test</a></li>

編輯,此處的代碼有錯別字,帶您進入的URL只是?author=

非常簡單。

您可以使用wordpress用戶列表插件來代替編寫代碼。

http://wordpress.org/plugins/user-list/

http://wordpress.org/plugins/wordpress-users-list/

您是不是要只在URL中打印數字。 只需回顯the_author_ID()。

<li><a href="?author=<?php echo the_author_ID(); ?>">test</a></li>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM