WordPress.org

Ready to get started?Download WordPress

Forums

Execute PHP code from custom field (2 posts)

  1. jugnuzia
    Member
    Posted 5 years ago #

    Hello!

    If anyone would like to execute php code in wordpress post so there are many plugin are avaliable on net but I want to execute php from custom field.

    <?php
    setlocale(LC_ALL, 'nl_NL.ISO-8859-15@euro');
    echo strftime('%A %d %B, %Y',strtotime(get_the_time('m/d/Y')));
    ?>

    i am trying to do execute this above php code. First I create one Custom Name and put above php code in the value and then I called function <?php woo_get_NAME (''); ?> in single.php file where ever i required this custom field but its not working. can anyone please help.

    thanks

  2. MichaelH
    Member
    Posted 5 years ago #

    Might look at the eval() statement:
    http://us.php.net/eval

Topic Closed

This topic has been closed to new replies.

About this Topic