Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/291.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 _content()中的文本显示为伸出容器的单行_Php_Html_Css_Wordpress_Bootstrap 4 - Fatal编程技术网

Php _content()中的文本显示为伸出容器的单行

Php _content()中的文本显示为伸出容器的单行,php,html,css,wordpress,bootstrap-4,Php,Html,Css,Wordpress,Bootstrap 4,当我在下面的代码中使用内容时,文本不尊重容器: 我以前做过,但从未发生过 <?php $html = ghc_featured_image(get_the_ID()); //** $html[0] returns HTML ** //** $html[1] returns if the image exists ** echo $html[0]; ?> <main class="container"> &

当我在下面的代码中使用
内容时,文本不尊重容器:

我以前做过,但从未发生过

<?php $html = ghc_featured_image(get_the_ID());
    //** $html[0] returns HTML **
    //** $html[1] returns if the image exists **

    echo $html[0];
    ?>

<main class="container">
     <div class="row justify-content-center">
          <div class="py-3 px-5 about-content border-rd bg-light <?php echo $html[1] ? 'col-md-8' : 'col-md-12 m-0' ?>">
               <h1 class="text-center my-5 separator"> <?php the_title()?> </h1>
               <?php the_content();?>
          </div> <!-- col-md-8 -->
     </div>
</main>


必须是css冲突。它应该与HTML和引导一起工作。转到控制台并调试css冲突如果发现任何css冲突,不要做什么看起来有什么东西阻止了文本包装,因此如果不是css,请检查内容中的实际文本-例如,它可能有不间断的空格。但是您向我们展示的代码没有问题,这是我们关于您网站的唯一信息,因此没有更多详细信息,我们无法提供其他帮助。您可以尝试以下
。。我们正在使用
wpautop()
将内容中的双行分隔符替换为段落。嗨,伙计们,我尝试了所有这些,但都不起作用。我记得我更新了WordPress,我重新安装了旧版本,效果很好,使用新版本它可以创建不间断的空格,正如您提到的@FluffyKitten,但旧版本没有。还是希望我能在将来解决这个问题。