Forums

ExecPHP and includes (2 posts)

  1. bluedrag
    Member
    Posted 11 months ago #

    I'm trying to include a php file inside a post (there is just a div with several pictures inside the php file) It doesn't seem to be working. execPHP is definitely running, I've tested it with an echo but nothing happens when I switch the echo for the include. Maybe a syntax error? Here is the code I'm using.

    <?php include('wp-content/theme_name/electric-products.php'); ?>

    I should also note there is no php error when I load up the page. Nothing happens at all. But the echo works fine...

  2. esmi
    Theme Diva & Forum Moderator
    Posted 11 months ago #

    Try using the full path from the document root.

Reply

You must log in to post.

About this Topic