WordPress.org

Ready to get started?Download WordPress

Forums

Allow PHP in Posts and Pages
does this not work with includes? (5 posts)

  1. peteratomic
    Member
    Posted 2 years ago #

    tried using this plugin with a simple include and nothing is showing up.

    <?php include("search.html"); ?>

    http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/

  2. Victor Font
    Member
    Posted 2 years ago #

    It works fine with includes. You're not calling it right.

    1. Save your html as a php file
    2. Upload the search.php file to a directory under wp-content. I called mine custom.
    3. Create a code snippet in the plugin settings screen of the following code:

    include_once('wp-content/custom/search.php');

    4. Insert [php function=1] in the post or page where you want the include.

    That's it!

  3. Punxsutawney Phil
    Member
    Posted 2 years ago #

    Great! It does work! thank you.

  4. Davell87
    Member
    Posted 2 years ago #

    This is not working for me. I am in debug mode and the include will get the first line of code, but it stops after that. The error messages are coming from the plugin files them selves.

    http://www.propertyboss.net/ClientCentral3.0/help-requests/

    I will have that up rendering the errors until I get it fixed.

    Thanks

  5. mjefferson96
    Member
    Posted 2 years ago #

    Victor,
    I just wanted to say thank you. You saved me hours on this one bro. Works great. I wish there was better instruction on how to use the snippet section, I probably would have had this done a long time ago.

    MJ

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic