0
votes
1answer
645 views

ob_get_clean returns empty string, ob_get_flush outputs string

I am utilizing a template-type system, to filter the_content. My filter contains this partial code: ob_start(); include_once ( self::$dir . 'views/templates/' . $post_type . '/' . $display . '.php' ...
-2
votes
3answers
49 views

Shortcode return is printing a 1 afterward

function build_total_search_method( $atts ) { $shorcode_php_function = include( dirname(__FILE__) . "/includes/total_search.php" ); return $shorcode_php_function; } add_shortcode( ...
0
votes
3answers
77 views

How and when to include shortcode source files

I am Writing a plugin, with many shortcodes. Now I do not want to include all shortcodes source files to every page. So my questions are: Where should I include the source? Is it back-end or ...
1
vote
2answers
7k views

Include PHP file in Content using [shortcode]

Here is what I have I am not having any lucking finding how to simply include a file in the content editor using a shortcode. For Example if I wanted to include form.php inside my Contact Page how ...
0
votes
3answers
564 views

Looking for a way to include/embed text from a file on a page so that the short codes are processed

I'm using WP as a CMS. I've got multiple pages that share the same header. group 1 has header 1. group 2 has header 2. etc. I've looked at these two plugins for a quick way to insert a combination ...