Advertisement
downloadtaky

functions/regsidebar.php

Mar 22nd, 2011
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.65 KB | None | 0 0
  1. <?php
  2. /** Qui iniziano le sidebar **/
  3. /**
  4.  * Register widgetized areas, including two sidebars and four widget-ready columns in the footer.
  5.  *
  6.  * To override appaqua_widgets_init() in a child theme, remove the action hook and add your own
  7.  * function tied to the init hook.
  8.  *
  9.  * @since Appartamenti Acquario 1.0
  10.  * @uses register_sidebar
  11.  */
  12. function appaqua_widgets_init() {
  13.     // Area 1, located at the top of the sidebar.
  14.     register_sidebar( array(
  15.         'name' => __( 'Primary Widget Area', 'appaqua' ),
  16.         'id' => 'primary-widget-area',
  17.         'description' => __( 'The primary widget area', 'appaqua' ),
  18.         'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  19.         'after_widget' => '</li>',
  20.         'before_title' => '<h3 class="widget-title">',
  21.         'after_title' => '</h3>',
  22.     ) );
  23.  
  24.     // Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
  25.     register_sidebar( array(
  26.         'name' => __( 'Secondary Widget Area', 'appaqua' ),
  27.         'id' => 'secondary-widget-area',
  28.         'description' => __( 'The secondary widget area', 'appaqua' ),
  29.         'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  30.         'after_widget' => '</li>',
  31.         'before_title' => '<h3 class="widget-title">',
  32.         'after_title' => '</h3>',
  33.     ) );
  34.  
  35.     // Area 3, located in the footer. Empty by default.
  36.     register_sidebar( array(
  37.         'name' => __( 'First Footer Widget Area', 'appaqua' ),
  38.         'id' => 'first-footer-widget-area',
  39.         'description' => __( 'The first footer widget area', 'appaqua' ),
  40.         'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  41.         'after_widget' => '</li>',
  42.         'before_title' => '<h3 class="widget-title">',
  43.         'after_title' => '</h3>',
  44.     ) );
  45.  
  46.     // Area 4, located in the footer. Empty by default.
  47.     register_sidebar( array(
  48.         'name' => __( 'Second Footer Widget Area', 'appaqua' ),
  49.         'id' => 'second-footer-widget-area',
  50.         'description' => __( 'The second footer widget area', 'appaqua' ),
  51.         'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  52.         'after_widget' => '</li>',
  53.         'before_title' => '<h3 class="widget-title">',
  54.         'after_title' => '</h3>',
  55.     ) );
  56.  
  57.     // Area 5, located in the footer. Empty by default.
  58.     register_sidebar( array(
  59.         'name' => __( 'Third Footer Widget Area', 'appaqua' ),
  60.         'id' => 'third-footer-widget-area',
  61.         'description' => __( 'The third footer widget area', 'appaqua' ),
  62.         'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  63.         'after_widget' => '</li>',
  64.         'before_title' => '<h3 class="widget-title">',
  65.         'after_title' => '</h3>',
  66.     ) );
  67.  
  68.     // Area 6, located in the footer. Empty by default.
  69.     register_sidebar( array(
  70.         'name' => __( 'Fourth Footer Widget Area', 'appaqua' ),
  71.         'id' => 'fourth-footer-widget-area',
  72.         'description' => __( 'The fourth footer widget area', 'appaqua' ),
  73.         'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  74.         'after_widget' => '</li>',
  75.         'before_title' => '<h3 class="widget-title">',
  76.         'after_title' => '</h3>',
  77.     ) );
  78.    
  79.     // Area 7, vicino allo slideshow.
  80.     register_sidebar( array(
  81.         'name' => __( 'Vicino allo slideshow', 'appaqua' ),
  82.         'id' => 'slide-box',
  83.         'description' => __( 'Vicino allo slideshow, utile per uno slogan', 'appaqua' ),
  84.         'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
  85.         'after_widget' => '</li>',
  86.         'before_title' => '<h3 class="widget-title">',
  87.         'after_title' => '</h3>',
  88.     ) );
  89. }
  90. /** Register sidebars by running appaqua_widgets_init() on the widgets_init hook. */
  91. add_action( 'widgets_init', 'appaqua_widgets_init' );
  92. /** End of the sidebars **/
  93. /** Register sidebars by running appaqua_widgets_init() on the widgets_init hook. */
  94. add_action( 'widgets_init', 'appaqua_widgets_init' );
  95. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement