Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php //add this below code into your theme’s functions.php
- //code for enable php code in widget
- add_filter('widget_text', 'php_text', 99);
- function php_text($text) {
- if (strpos($text, '<' . '?') !== false) {
- ob_start();
- eval('?' . '>' . $text);
- $text = ob_get_contents();
- ob_end_clean();
- }
- return $text;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement