SHARE
TWEET

Untitled

a guest Jun 27th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div class="widget">
  2. Some WordPress widget's code
  3. </div>
  4.      
  5. register_sidebar( array(
  6.     'name' => __( 'Main Sidebar', 'twentyeleven' ),
  7.     'id' => 'sidebar-1',
  8.     'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  9.     'after_widget' => "</aside>",
  10.     'before_title' => '<h3 class="widget-title">',
  11.     'after_title' => '</h3>',
  12. ) );
  13.      
  14. <div id="sample-widget" style="text-align:center">
  15.      
  16. // Registering new widget area
  17. function sample_widgets_init() {
  18.     register_sidebar( array(
  19.         'name' => 'Footer',
  20.         'id' => 'Footer',
  21.         'before_widget' => '<div id="sample-widget" style="text-align:center">',
  22.         'after_widget' => '</div>',
  23.         'before_title' => '<h2 class="rounded">',
  24.         'after_title' => '</h2>',
  25.     ) );
  26. }
  27. // Initializing our newly created function named as "sample_widgets_init"
  28. add_action( 'widgets_init', 'sample_widgets_init' );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top