blogjunkie

blogjunkie.net custom_functions.php for Headway theme

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