Title: Execute PHP code from custom field
Last modified: August 19, 2016

---

# Execute PHP code from custom field

 *  [jugnuzia](https://wordpress.org/support/users/jugnuzia/)
 * (@jugnuzia)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/execute-php-code-from-custom-field/)
 * 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

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/execute-php-code-from-custom-field/#post-1054530)
 * Might look at the eval() statement:
    [http://us.php.net/eval](http://us.php.net/eval)

Viewing 1 replies (of 1 total)

The topic ‘Execute PHP code from custom field’ is closed to new replies.

## Tags

 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)
 * [video](https://wordpress.org/support/topic-tag/video/)
 * [wordpress 2.7](https://wordpress.org/support/topic-tag/wordpress-2-7/)

 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/execute-php-code-from-custom-field/#post-1054530)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
