我发现了一些关于将 substr() 添加到变量而不是函数的教程。到目前为止,html 中的输出是:
<div class="symbol"><?php the_title();?></h3>
the_title()
当我将鼠标悬停在它上面时,它会在 Eclipse 中显示以下功能:
function = the_title($before = '', $after = '', $echo = true){
$title = get_the_title();
if (strlen($title) == 0 )
return
$title = $before . $title . $after
if ($echo)
echo $title;
else
...
我只是不确定是否需要在后端页面中添加该功能,或者我可以在前端对其进行编码。