Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress显示完整的博客文章标题(二十一主题)_Php_Wordpress - Fatal编程技术网

Php Wordpress显示完整的博客文章标题(二十一主题)

Php Wordpress显示完整的博客文章标题(二十一主题),php,wordpress,Php,Wordpress,我使用了212个Wordpress主题,经过大量测试和搜索,我无法在我的主页上显示完整的博客文章标题 我更改了content.php文件并编写了以下代码: <h1 class="entry-title"> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </h1> 但它向我展示了摘录 有什么想法吗?我已经有一

我使用了212个Wordpress主题,经过大量测试和搜索,我无法在我的主页上显示完整的博客文章标题

我更改了content.php文件并编写了以下代码:

<h1 class="entry-title">
    <a href="<?php the_permalink(); ?>">
        <?php the_title(); ?>
    </a>
</h1>

但它向我展示了摘录


有什么想法吗?

我已经有一段时间没有使用WordPress了,但据我记忆所及,我需要为网站设置标题和主题设置

在主题设置中,应该有一个显示和隐藏站点标题,只需检查一下即可。 这应该会有帮助


不需要代码

为什么不在页面插件中使用帖子这允许您在网站(包括主页)上添加带有完整标题和页面的帖子请将代码粘贴到for循环中:

<?php
if ( have_posts() ) :
    while ( have_posts() ) : the_post(); ?>
        <h1 class="entry-title">
        <a href="<?php the_permalink(); ?>">
         <?php the_title(); ?>
        </a>
</h1>
<?php endwhile;
else :
    echo wpautop( 'Sorry, no posts were found' );
endif;
?>


您是否在循环中使用这段代码?请参阅本页的说明段落:。如果您不在循环中,则需要使用get_the_title()函数。感谢您的回答,是的,我在循环中使用它:-/Yes您可以设置在Wordpress设置中显示摘录或完整内容,但仅显示内容,而不显示标题。我试着把它设置成完整的内容,但没有改变。谢谢你的帮助:-)好主意!我下班后试试看!但即使成功了,这也是个骗局。。我希望有一个本地解决方案。:-)(但如果它能工作,我不会抱怨!)我以前用过那个插件,我发现它工作得很好。祝OMFG好运!!!!!!!!!!我是个疯狂的白痴!从一开始一切都很好!我只是没有写出好的标题,我复制/粘贴了一个标题,结尾是“…”。。。整个周末都输了!非常感谢你试图帮助我。。。但你无法解决愚蠢的问题。