WordPress.org

Ready to get started?Download WordPress

Forums

ExecPHP and includes (2 posts)

  1. bluedrag
    Member
    Posted 3 years 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
    Forum Moderator
    Posted 3 years ago #

    Try using the full path from the document root.

Topic Closed

This topic has been closed to new replies.

About this Topic