Pure php :
<a href="author.php/?author_name=<?php echo $author_name; ?>">Test</a>
WP Coding :
<a href="<?php xtocky_get_template('author', '', array('author_name' => get_the_author();) );?>">Test</a>
It doesnt give any error but my website keep loading, cannot open. How to convert pure php into wp coding?
答案 0 :(得分:1)
我认为没有任何名为xtocky_get_template的函数:
如果您只想获取模板,请尝试以下操作:
<a href="<?php get_template('author', '', array('author_name' =>
get_the_author();) );?>">Test</a>