sushma_proach

widget area call full description

May 31st, 2016
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. fisrt of all when call widget area we can go in fumnction.php paste this code
  2.  
  3. <?php
  4. // Custom widget area.
  5.  register_sidebar( array(
  6.     'name' => __( 'header-top-area'),
  7.     'id' => 'header-top-area',
  8.     'description' => __( 'An optional custom widget area for your site', 'twentyten' ),
  9.     'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  10.     'after_widget' => "</li>",
  11.     'before_title' => '<h3 class="widget-title">',
  12.     'after_title' => '</h3>',
  13. ) );
  14. ?>
  15.  
  16.  
  17. then go to any file likr header.php call widget area then call to in the div class and paste the code
  18.  
  19. <?php dynamic_sidebar( 'header-top-area' ); ?>  and then go to widget area and use to any elements.
Add Comment
Please, Sign In to add comment