有没有办法在wordpress中添加摘录的开头?我尝试像这样添加作者的名字,以便它们都在同一个文本块中:
<strong>(<?php echo get_the_author(); ?>) --</strong> Excerpt text....
它看起来像:
(作者姓名) -- 摘录文本.....
$custom_excerpt = '<strong>('.get_the_author() .') ---</strong>'.get_the_excerpt();
echo $custom_excerpt ;
试试这个函数:the_author();
对于您的围栏:http://codex.wordpress.org/Function_Reference/the_author