转换纯php格式<a href=""> into wp coding format

时间:2018-03-08 18:47:18

标签: wordpress

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?

1 个答案:

答案 0 :(得分:1)

我认为没有任何名为xtocky_get_template的函数:

如果您只想获取模板,请尝试以下操作:

  <a href="<?php get_template('author', '', array('author_name' => 
   get_the_author();) );?>">Test</a>