• 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)
  • 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

    Everything on the site is up-to-date with the latest and greatest.

    And yes, it was activated before I tried.

    Plugin Author webcraftic

    (@webcraftic)

    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

    Best regrads, Alex

    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

    Plugin Author webcraftic

    (@webcraftic)

    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

    Best regards, Alex

    Sent. Thank you.

    Plugin Author webcraftic

    (@webcraftic)

    Hi,
    I looked at your file. It does not print anything in the document, what do you expect from this file?

    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

    redlineguiding

    (@redlineguiding)

    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.

    redlineguiding

    (@redlineguiding)

    I mean snippets ^^

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Include support with new version’ is closed to new replies.