Title: Include support with new version
Last modified: June 13, 2018

---

# Include support with new version

 *  [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * (@redlineguiding)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/include-support-with-new-version/)
 * I was using something like this to include a master pricing file on certain pages
   so as to save updating each page when making changes.
 * `[insert_php]include(TEMPLATEPATH.'/_filename.php');[/insert_php]`
 * I created a short tag for this function and tested it on a page. I didn’t change
   any of the outputs/echo (using old insert php tags) on the page yet as I wanted
   to be sure the include function would work.
 * It didn’t. There was no output. So right at the starting gate, I’m having this
   issue. I’m dreading future updates. Deprecating the old version is going to cause
   me a lot of work.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Thread Starter [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * (@redlineguiding)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10396756)
 * I should add that this is on a private page. I wanted to test there before trying
   out public pages. Site is here: [http://redlineguiding.com](http://redlineguiding.com)
 * Everything on the site is up-to-date with the latest and greatest.
 *  Thread Starter [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * (@redlineguiding)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10397484)
 * And yes, it was activated before I tried.
 *  Plugin Author [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10403933)
 * Hi,
    This should work, I checked it on my site. Please check whether the snippet
   is active before using it.
 * Suggest, how can I help you? You can record video and show the location of your
   file and how to include snippets in your pages. Perhaps I can find an error in
   your actions.
 * Sent to my email: [wordpress.webraftic@gmail.com](https://wordpress.org/support/topic/include-support-with-new-version/wordpress.webraftic@gmail.com?output_format=md)
 * Best regrads, Alex
 *  Thread Starter [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * (@redlineguiding)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10404134)
 * Hi Alex,
 * It is/was active. I can’t send a video at the moment, but the snippet I created,
   and activated, and is what’s between those old `[insert_php]` tags above. No 
   changes. Your instructions are clear. And it’s really straightforward. I put 
   that code content in the snippet, named it, described it, saved it, activated
   it, then put the short code it produced on the page where the include above is
   used and in the same manner — without those old tags of course — and the expected
   output wasn’t there. I then put the old include line back and it still works.
 * The included file resides in the theme folder. No changes to the path above.
 * One thing I didn’t do is to create a snippet for the output — the output being
   what echos() what’s in the include file. For the output I relied on the old `[
   insert_php]` tags. That shouldn’t make a difference though… should it? I can 
   mix and match the old tags with the snippets, can’t I, or does it have to be 
   changed all at the same time, page by page? And if that IS the problem I’m having,
   can I use both old and new on the page simultaneously (to include the file the
   old way and the new way if it’s indeed a different method)? That way I can work
   on a single page incrementally.
 * Hopefully keeping this thread going until resolved will assist others making 
   the transition.
 * Thank you very much.
    Mike
    -  This reply was modified 7 years, 10 months ago by [redlineguiding](https://wordpress.org/support/users/redlineguiding/).
 *  Plugin Author [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10408997)
 * Hi,
 * Send me your file so that I can test it on my website. I do not understand the
   reasons why this does not work for you, but I think the problem is inside the
   _filename.php file
 * My email: [wordpress.webraftic@gmail.com](https://wordpress.org/support/topic/include-support-with-new-version/wordpress.webraftic@gmail.com?output_format=md)
 * Best regards, Alex
 *  Thread Starter [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * (@redlineguiding)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10409145)
 * Sent. Thank you.
 *  Plugin Author [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10423899)
 * Hi,
    I looked at your file. It does not print anything in the document, what 
   do you expect from this file?
 * ![](https://i0.wp.com/i.snag.gy/J8y2lc.jpg?ssl=1)
 * This code below prints the contents of the $ hyperext_day_add variable declared
   in your file. So it all works fine.
 *     ```
       include(TEMPLATEPATH.'/_filename.php');
       echo $hyperext_day_add;
       ```
   
 * Result: 300
 * Best regards, Alex
 *  Thread Starter [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * (@redlineguiding)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10424515)
 * Obviously I have stuff like this on my pages.
 * `[insert_php]echo("$somassignedvalue);[/insert_php]`
 * The point of this being that I can apply a global price or other value change
   on my site by editing that one file I include(). This makes updates easy.
 * If I understand what you’re saying correctly, I need to add this include() for
   every echo() instance on the each applicable page? In other words, for every 
   echo() short code I will produce I need to add the include() to it, too?
 * I just include the file once currently (though I’m not referring to the include_once()
   function). I figured it’d work the same same. One short code for the include()
   then one shortccode for each echo().
 * I would normally include this file in the HEAD but it doesn’t work so I include
   the file once per applicable page in the page or post content, then echo() the
   values as many times as needed further down each page, using that above.
 *  Thread Starter [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * (@redlineguiding)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10424519)
 * I mean snippets ^^

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Include support with new version’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

## Tags

 * [new version](https://wordpress.org/support/topic-tag/new-version/)
 * [short tags](https://wordpress.org/support/topic-tag/short-tags/)

 * 9 replies
 * 2 participants
 * Last reply from: [redlineguiding](https://wordpress.org/support/users/redlineguiding/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/include-support-with-new-version/#post-10424519)
 * Status: not resolved