get_the_content & include_once
-
Hi
I’m building my first plugin and I would like to know whether this is the correct way to setget_the_content()
with including external php files. Almost is fine, but sometimes the content of test.php is appeared on the top of the page, outside the theme.function Test($myContent) { $content = get_the_content(); $incl = get_the_content(include_once("test.php")); $content = apply_filters('the_content', $content . $incl); } add_action('wp', 'myContent');
Content of test.php:
<?php echo "Test"; ?>
Thank you for the Feedback,
Lomo
- The topic ‘get_the_content & include_once’ is closed to new replies.