0

我想在我的模板上添加一个链接,以链接到用户自己的博客文章,我尝试使用的代码是<li><a href="?author=<?php the_author_ID(); ?>">test</a></li>.

编辑,这里的代码有错字,它带你去的网址只是?author=

4

2 回答 2

1

Its very simple.

you can use wordpress user list plugins instead of writing codes.

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

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

于 2013-09-10T16:07:13.103 回答
0

您的意思是您只想在 URL 中打印数字。只需回显 the_author_ID()。

<li><a href="?author=<?php echo the_author_ID(); ?>">test</a></li>
于 2013-09-10T17:25:31.823 回答