• I want to include a php file in all my post pages, and then pull a variable from that file which displays a product price. The idea is I can quickly update this in one file without updating each post. I am trying to use the exec-php plugin to do make the php work in the post. (https://bluesome.net/post/2005/08/18/50/)

    If this is completely crazy then let me know! I’m a dumb designer, and not sure the best way to do it.

    My idea is
    header.php code:

    <?php include('prices.php'); ?>

    prices.php code:

    <?php
    $price1 = '<p class="price"><span class="sale">&pound;41.00</span>&pound;35.00</p>';
    ?>

    code in the post:
    <?php echo $price1;?>

    of course this isn’t working ??
    ANY help appreciated.. spend half a day with this.

    thanks!!

  • The topic ‘include file and variable in post… help appreciated!?’ is closed to new replies.