Advertisement
cypherinfo

How to create two widget horizontal area in wordpress home

Oct 18th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <!-- this code has to be plaaced in the function.php: -->
  2.  
  3. if (function_exists('register_sidebar')) {  
  4.       register_sidebar(array(  
  5.        'name' => 'Sidebar Widgets',  
  6.        'id'   => 'sidebar-widgets',  
  7.        'description'   => 'Widget Area',  
  8.        'before_widget' => '<div>',  
  9.        'after_widget'  => '</div>',  
  10.        'before_title'  => '<h2>',  
  11.        'after_title'   => '</h2>'  
  12.       ));  
  13.      }  
  14.  
  15. <!-- this code has to pklaced in the location where you needs it (index.php etc.): -->
  16. <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Widgets') ) : ?>  
  17.        <?php endif; ?>  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement