Posted By

JamesAbels on 05/31/14


Tagged

wordpress widget theme custom


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

fhenderson


Wordpress: Custom Widget Area


 / Published in: PHP
 

A custom widget area for wordpress.

  1. PLACE WHERE YOU WANT WIDGET AREA TO GO
  2.  
  3. <?php
  4. if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('AREA_NAME') ) : ?>
  5. <?php endif; ?>
  6.  
  7.  
  8.  
  9.  
  10. PLACE IN FUNCTIONS.PHP
  11.  
  12. register_sidebar( array(
  13. 'name' => __( 'Area Display Name'),
  14. 'id' => 'AREA_NAME',
  15. 'description' => __( 'Area Description'),
  16. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  17. 'after_widget' => "</li>",
  18. 'before_title' => '<h3 class="widget-title">',
  19. 'after_title' => '</h3>',
  20. ) );

Report this snippet  

You need to login to post a comment.