Php 从内容中提取标题的步骤
我得到的标题内的内容后。作为代码“内容”,包括其内部内容的标题。但是我想把我的标题和内容分开。如何在php/wordpres中实现这一点 矿山现行代码:Php 从内容中提取标题的步骤,php,wordpress,Php,Wordpress,我得到的标题内的内容后。作为代码“内容”,包括其内部内容的标题。但是我想把我的标题和内容分开。如何在php/wordpres中实现这一点 矿山现行代码: <div class="content-holder"> <?php the_content(); ?> </div> 我需要什么
<div class="content-holder">
<?php the_content(); ?>
</div>
我需要什么:
<div class="content-holder">
<h1><?php the_title();?></h1>
<hr style="margin-top: 20px;"/>
<?php the_content(); ?>
</div>
因为第二个代码两次生成标题
…你确定吗?据我所知,
内容
将排除标题,您在内容部分有其他标题吗?