/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function widget($atts) { global $wp_widget_factory; 'widget_name' => FALSE ), $atts)); $widget_name = wp_specialchars($widget_name); return '<p>'.sprintf(__("%s: Widget class not found. Make sure this widget exists and the class name is correct"),'<strong>'.$class.'</strong>').'</p>'; else: $class = $wp_class; endif; endif; 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '' )); return $output; } add_shortcode('widget','widget');