admin管理员组文章数量:1393361
I´ve tried everything I know (include file, file_get_contents, "IncludeMe"-Plugin and others) to execute a shortcode within a textfile, but it didn´t work.
So here is the problem detailed and I hope somebody could help me: I´m taking different rows of post_content from a textfile this way:
$text = $_SERVER["DOCUMENT_ROOT"].'wptext/more_text.txt';
$texto = file($text);
global $wp_query;
$postid = $wp_query->post->ID;
$pm_row = get_post_meta($postid, 'pm_row', true);
global $wp_query;
echo $texto[$pm_row];
It works so far, but in some of those rows are different shortcodes embedded. They don´t work and were always shown as plain text instead, although they are all functionel - outside of this textfile.
What am I missing?
Any hints for this?
本文标签: phpExecute Shortcode in Textfile
版权声明:本文标题:php - Execute Shortcode in Textfile 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744761889a2623803.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论