Php 如何在wordpress where<;中将_content()拆分并存储到数组中--下一页-->;
我想在Wordpress中拆分Php 如何在wordpress where<;中将_content()拆分并存储到数组中--下一页-->;,php,wordpress,Php,Wordpress,我想在Wordpress中拆分内容()函数,其中并将其存储到数组中,我试图在不使用插件的情况下实现这一点。而不是使用内容()(将直接在页面上打印内容),您可以使用获取内容(),然后从那里拆分它: $parts = explode('<!--nextpage-->', get_the_content()); $parts=explode(“”,获取内容()); 您可以使用获取内容()然后从中拆分,而不是使用内容()(这将直接在页面上打印内容): $parts = explode('&
内容()
函数,其中
并将其存储到数组中,我试图在不使用插件的情况下实现这一点。而不是使用内容()
(将直接在页面上打印内容),您可以使用获取内容()
,然后从那里拆分它:
$parts = explode('<!--nextpage-->', get_the_content());
$parts=explode(“”,获取内容());
您可以使用获取内容()
然后从中拆分,而不是使用内容()
(这将直接在页面上打印内容):
$parts = explode('<!--nextpage-->', get_the_content());
$parts=explode(“”,获取内容());
只需使用该函数(内容将回显,get_uu函数将不回显)并按如下方式分解它:
$content = get_the_content();
list($page, $nextpage) = explode('<!--nextpage-->', $content);
// or when $content has more than one "<!--nextpage-->"
$pages = explode('<!--nextpage-->', $content);
$content=获取内容();
列表($page,$nextpage)=分解(“”,$content);
//或者当$content有多个“”
$pages=分解(“”,$content);
只需使用该函数(内容将回显,get_uu函数将不回显)并按如下方式分解它:
$content = get_the_content();
list($page, $nextpage) = explode('<!--nextpage-->', $content);
// or when $content has more than one "<!--nextpage-->"
$pages = explode('<!--nextpage-->', $content);
$content=获取内容();
列表($page,$nextpage)=分解(“”,$content);
//或者当$content有多个“”
$pages=分解(“”,$content);
这很优雅-我喜欢。引入注释不会影响任何事情,而且这是一种在编辑器中划分您希望中断发生的位置的简单方法。酷!这是优雅的-我喜欢它。引入注释不会影响任何事情,而且这是一种在编辑器中划分您希望中断发生的位置的简单方法。酷!