Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***** Shortcode, Custom Posts with Widget *****/
- /* Register sidebars and widgetized areas
- ********************************************/
- // this is for right sidebar
- function technotiers_widget_areas() {
- register_sidebar( array(
- 'name' => __( 'Right Sidebar', 'NewsTheme' ),
- 'id' => 'right_sidebar',
- 'before_widget' => '<div class="single_sidebar">',
- 'after_widget' => '</div>',
- 'before_title' => '<h2>',
- 'after_title' => '</h2>',
- ) );
- }
- add_action('widgets_init', 'technotiers_widget_areas');
- /***** write the following code between div to activate sidebar or dynamic sidebar
- *****/
- <?php dynamic_sidebar('right_sidebar'); ?>
- // write the following code on functions.php to activate shortcode in widget
- add_filter('widget_text', 'do_shortcode');
Add Comment
Please, Sign In to add comment