Php WordPress:在每一个标签后都有自己的内容

Php WordPress:在每一个标签后都有自己的内容,php,wordpress,wysiwyg,Php,Wordpress,Wysiwyg,我希望每次在编辑器中使用more标记时都显示内容。 我找到了一个解决方案,可以使用以下代码为第一个或多个标记执行此操作: <?php if ($pos=strpos($post->post_content, '<!--more-->')): ?> <?php $more = 0; the_content(''); ?> <div>CONTENT HERE</div> <?php $more = 1; the_content(

我希望每次在编辑器中使用more标记时都显示内容。 我找到了一个解决方案,可以使用以下代码为第一个或多个标记执行此操作:

<?php if ($pos=strpos($post->post_content, '<!--more-->')): ?>
<?php $more = 0; the_content(''); ?>
<div>CONTENT HERE</div>
<?php $more = 1; the_content('', true); ?>
<?php else : the_content(); endif; ?>

满足于此

对于内容中的每一个标签,有什么方法可以做到这一点吗?

您对此有何看法

<?php 
$contenido="Lorem ipsum dolor sit amet, his id porro lucilius theophrastus. -mas- Eum labitur voluptaria te, magna veniam civibus -mas- ad mei. An per ornatus officiis quaerendum, sonet timeam ad eam, nec an vidisse discere intellegam. Iusto habemus reprimique an nec.";

$contenidoExploded=explode('-mas-',$contenido);

if(count($contenidoExploded)>1){
    foreach($contenidoExploded as $p){
        echo $p.'</p>';   
    }
}else{
    echo $contenido;
}