Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/228.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 如果没有html标签,如何获取wordpress页面内容? $content=获取内容(); var_dump($content);_Php_Html_Wordpress_Tags - Fatal编程技术网

Php 如果没有html标签,如何获取wordpress页面内容? $content=获取内容(); var_dump($content);

Php 如果没有html标签,如何获取wordpress页面内容? $content=获取内容(); var_dump($content);,php,html,wordpress,tags,Php,Html,Wordpress,Tags,这是我从我的页面中得到的,我无法进行一些更改。使用wp\u strip\u all\u标签功能 谢谢 你能在get\u the_content()method中分享代码吗谢谢你的回答,现在我只得到了paragrapf内容。我失去了媒体链接。还有其他功能吗?若我能获得数组中的所有内容,那个就太好了,这样我就可以做一些其他的更改 $content = get_the_content(); var_dump($content); <figure class="wp-block-gal

这是我从我的页面中得到的,我无法进行一些更改。

使用wp\u strip\u all\u标签功能


谢谢

你能在
get\u the_content()
method中分享代码吗谢谢你的回答,现在我只得到了paragrapf内容。我失去了媒体链接。还有其他功能吗?若我能获得数组中的所有内容,那个就太好了,这样我就可以做一些其他的更改
$content = get_the_content(); 
var_dump($content);
<figure class="wp-block-gallery columns-1 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="http://www.frizon.rs/wp-content/uploads/2020/11/veliki-frizider.jpg" alt="" data-id="67" data-full-url="http://www.frizon.rs/wp-content/uploads/2020/11/veliki-frizider.jpg" data-link="http://www.frizon.rs/veliki-frizider/" class="wp-image-67"/></figure></li></ul></figure>
wp_strip_all_tags( $content );