blogjunkie

Untitled

Aug 26th, 2011
347
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /* Footer widgets */
  4.  
  5. // Register sidebar
  6. register_sidebar(array(
  7.     'name' => 'Footer Widgets 1',
  8.     'id' => 'footer-widget-1',
  9.     'before_widget' => '<div id="%1$s" class="footer-item %2$s">',
  10.     'after_widget' => '</div>',
  11.     'before_title' => '<span class="widget-title">',
  12.     'after_title' => '</span>',
  13.     ));
  14. register_sidebar(array(
  15.     'name' => 'Footer Widgets 2',
  16.     'id' => 'footer-widget-2',
  17.     'before_widget' => '<div id="%1$s" class="footer-item %2$s">',
  18.     'after_widget' => '</div>',
  19.     'before_title' => '<span class="widget-title">',
  20.     'after_title' => '</span>',
  21.     ));
  22. register_sidebar(array(
  23.     'name' => 'Footer Widgets 3',
  24.     'id' => 'footer-widget-3',
  25.     'before_widget' => '<div id="%1$s" class="footer-item %2$s">',
  26.     'after_widget' => '</div>',
  27.     'before_title' => '<span class="widget-title">',
  28.     'after_title' => '</span>',
  29.     ));
  30.  
  31. // inject widget areas into footer
  32. add_action('headway_before_footer', 'click_widgetized_footer');
  33. function click_widgetized_footer() {
  34.     ?>
  35.         <div id="footer-widgets-wrapper" class="clearfix">
  36.            
  37.             <!-- Back to top link -->
  38.             <a id="more" href="#whitewrap">&#x21E7; Back to top</a>
  39.            
  40.             <div id="footer-widgets">
  41.                 <div id="footer-widgets-1" class="footer-widgets-column">
  42.                 <?php
  43.                     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-widget-1') ) echo '<p align="center">Footer Widget Area 1</p>';
  44.                 ?>
  45.                 </div>
  46.                 <div id="footer-widgets-2" class="footer-widgets-column">
  47.                 <?php
  48.                     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-widget-2') ) echo '<p align="center">Footer Widget Area 2</p>';
  49.                 ?>
  50.                 </div>
  51.                 <div id="footer-widgets-3" class="footer-widgets-column">
  52.                 <?php
  53.                     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-widget-3') ) echo '<p align="center">Footer Widget Area 3</p>';
  54.                 ?>
  55.                 </div>
  56.             <div class="clear"></div>
  57.             </div>
  58.         </div>
  59.     <?php
  60. }
  61.  
  62. /* WooTumblog stuff */
  63.  
  64. add_action('headway_before_post_title', 'mytumblog_before_title');
  65. add_action('headway_before_excerpt_title', 'mytumblog_before_title');
  66. function mytumblog_before_title(){
  67.     woo_tumblog_the_title("entry-title");
  68.     echo "<!--";
  69. }
  70. add_action('headway_after_post_title', 'mytumblog_after_title');
  71. add_action('headway_after_excerpt_title', 'mytumblog_after_title');
  72. function mytumblog_after_title(){
  73.     echo "-->";
  74. }
  75. add_action('headway_entry_content_open', 'mytumblog_content');
  76. function mytumblog_content(){
  77.     woo_tumblog_content();
  78. }
RAW Paste Data