Posted by Table for Five Tue 6th Mar 2007 22:50 - Syntax is Java - 26 views
Download | New Post | Modify | Hide line numbers
Description:
This is my current side bar code for all pages.


  1.  
  2. class="secondary">
  3.  
  4.  


  5.  
  6.  
  7.  
  8. /* WordPress Widget Support */ if (function_exists('dynamic_sidebar') and dynamic_sidebar()) { } else { ?>
  9.  
  10.    
    "search">

    ('Search','k2_domain'); ?>

  11.         (TEMPLATEPATH . '/searchform.php'); ?>
  12.    
  •  
  •  
  •     /* Menu for subpages of current page */
  •         global $notfound;
  •         if (is_page() and ($notfound != '1')) {
  •             $current_page = $post->ID;
  •             while($current_page) {
  •                 $page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
  •                 $current_page = $page_query->post_parent;
  •             }
  •             $parent_id = $page_query->ID;
  •             $parent_title = $page_query->post_title;
  •  
  •             if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) {
  •     ?>
  •  
  •    
    class="sb-pagemenu">
  •        

    ('Subpages','k2_domain'); ?>

  •        
  •        
  •             ('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
  •        
  •            
  •         if ($parent_id != $post->ID) { ?>
  •         } ?>
  •    
  •     } } ?>
  •  
  •    
  •     if (is_attachment()) { ?>
  •        
    class="sb-pagemenu">
  •        
  •     } ?>
  •  
  •     /* If there is a custom about message, use it on the frontpage. */ $k2about = get_option('k2aboutblurp'); if ((is_home() and $k2about != '') or !is_home() and !is_page() and !is_single() or is_paged()) { ?>
  •        
  •    
    class="sb-about">
  •        

    ('About','k2_domain'); ?>

  •        
  •         /* Frontpage */ if (is_home() and !is_paged()) { ?>
  •        

    ($k2about); ?>

  •        
  •         /* Category Archive */ } elseif (is_category()) { ?>
  •        

    (__('You are currently browsing the %1$s weblog archives for the %2$s category.','k2_domain'), 'get_settings('siteurl') .'">' . get_bloginfo('name') . '', single_cat_title('', false) ) ?>

  •  
  •         /* Day Archive */ } elseif (is_day()) { ?>
  •        

    (__('You are currently browsing the %1$s weblog archives for the day %2$s.','k2_domain'), 'get_settings('siteurl') .'">' . get_bloginfo('name') . '', get_the_time(__('l, F jS, Y','k2_domain'))) ?>

  •  
  •         /* Monthly Archive */ } elseif (is_month()) { ?>
  •        

    (__('You are currently browsing the %1$s weblog archives for the month %2$s.','k2_domain'), 'get_settings('siteurl').'">'.get_bloginfo('name').'', get_the_time(__('F, Y','k2_domain'))) ?>

  •  
  •         /* Yearly Archive */ } elseif (is_year()) { ?>
  •        

    (__('You are currently browsing the %1$s weblog archives for the year %2$s.','k2_domain'), 'get_settings('siteurl').'">'.get_bloginfo('name').'', get_the_time('Y')) ?>

  •        
  •         /* Search */ } elseif (is_search()) { ?>
  •        

    (__('You have searched the %1$s weblog archives for \'%2$s\'.','k2_domain'),'get_settings('siteurl').'">'.get_bloginfo('name').'', wp_specialchars($s)) ?>

  •  
  •         /* Author Archive */ } elseif (is_author()) { ?>
  •        

    (__('Archive for %s.','k2_domain'), get_the_author()) ?>

  •        

    (); ?>

  •  
  •         } elseif (function_exists('is_tag') and is_tag()) { ?>
  •        

    (__('You are currently browsing the %1$s weblog archives for \'%2$s\' tag.','k2_domain'), 'get_settings('siteurl').'">'.get_bloginfo('name').'', get_query_var('tag') ) ?>

  •        
  •         /* Paged Archive */ } elseif (is_paged()) { ?>
  •        

    (__('You are currently browsing the %s weblog archives.','k2_domain'), 'get_settings('siteurl').'">'.get_bloginfo('name').'') ?>

  •  
  •         /* Permalink */ } elseif (is_single()) { ?>
  •        

    ('%', __('Next: ','k2_domain'),'yes') ?>

  •         ('%', __('Previous: ','k2_domain') ,'yes') ?>

  •  
  •         } ?>
  •  
  •         ('k2asidescategory'); if (!is_home() and !is_paged() and !in_category($k2asidescategory) or is_day() or is_month() or is_year() or is_author() or is_search() or (function_exists('is_tag') and is_tag())) { ?>
  •            

    ('Longer entries are truncated. Click the headline of an entry to read it in its entirety.','k2_domain'); ?>

  •         } ?>
  •    
  •            
  •     } ?>
  •  
  •  
  •     /* Brian's Latest Comments */ if ((function_exists('blc_latest_comments')) and is_home()) { ?>
  •    
    class="sb-comments" id="brians-latest-comments">
  •        

    ('Comments','k2_domain'); ?>

  •        
  •         "" title="" class="feedlink">"/images/feed.png" alt="RSS" />
  •        
  •             ('5','3','false'); ?>
  •        
  •    
  •     } ?>
  •  
  •     /* Show Asides only on the frontpage */ if (!is_paged() and is_home()) { if (get_option('k2asidesposition') != '0' and get_option('k2asidescategory') != '0') { ?>
  •    
    class="sb-asides">
  •        

    (get_option('k2asidescategory')); ?>

  •         class="metalink">"/?feed=rss&cat=" title="" class="feedlink">"/images/feed.png" alt="RSS" />
  •        
  •        
    /* Choose a category to be an 'aside' in the K2 options panel */ $temp_query = $wp_query; query_posts("cat=".get_option('k2asidescategory')."&showposts=".get_option('k2asidesnumber')); while (have_posts()) : the_post(); ?>
  •            

    "post-" class="aside">» (array('

    ','

    '), '', apply_filters('the_content', $post->post_content)); ?> class="metalink">"ID) ?>" rel="bookmark" title='Permanent Link to this aside','k2_domain'); ?>'># class="metalink">('0', '1', '%', '', ' '); ?>(__('edit','k2_domain'),'  ',''); ?>

  •             /* End Asides Loop */ endwhile; $wp_query = $temp_query; ?>
  •        
  •    
  •     } } ?>
  •  
  •  
  •     /* Latest Entries */ if ( (is_home()) or (is_search() or (is_404()) or ($notfound == '1')) or (function_exists('is_tag') and is_tag()) or ( (is_archive()) and (!is_author()) ) ) { ?>
  •    
    class="sb-latest">
  •        

    ('Latest','k2_domain'); ?>

  •         class="metalink">"" title="" class="feedlink">"/images/feed.png" alt="RSS" />
  •  
  •        
  •             ('type=postbypost&limit=10'); ?>
  •        
  •    
  •     } ?>
  •  
  •  
  •     /* FlickrRSS Plugin */ if ((function_exists('get_flickrRSS')) and is_home() and !(is_paged())) { ?>
  •    
    class="sb-flickr">
  •        

    Flickr

  •         class="metalink">"http://flickr.com/services/feeds/photos_public.gne?id=&format=rss_200" title="" class="feedlink">"/images/feed.png" alt="RSS" />
  •  
  •        
  •             (); ?>
  •        
  •    
  •     } ?>
  •  
  •  
  •     /* if ((function_exists('feedlist')) and is_home() and !(is_paged()) ) { ?>
  •    

  •        
  •             "",
  •                 "num_items"=>10,
  •                 "show_description"=>false,
  •                 "random"=>true,
  •                 "sort"=>"asc","new_window"=>true));
  •             ?>
  •            
  •    
  •     ?>
  •  
  •  
  •     /* Links */ if ( (is_home()) and !(is_page()) and !(is_single()) and !(is_search()) and !(is_archive()) and !(is_author()) and !(is_category()) and !(is_paged()) ) { $links_list_exist = @$wpdb->get_var("SELECT link_id FROM $wpdb->links LIMIT 1"); if($links_list_exist) { ?>
  •    
    class="sb-links">
  •        
  •             (); ?>
  •        
  •    
  •     } } ?>
  •  
  •  
  •     /* Archives */ if ( (is_archive()) or (is_search()) or (is_paged()) or ($notfound == '1') or (function_exists('is_tag') and is_tag()) ) { ?>
  •    
    class="sb-months">
  •        

    ('Archives','k2_domain'); ?>

  •        
  •        
  •             ('type=monthly'); ?>
  •        
  •    
  •  
  •    
    class="sb-categories">
  •        

    ('Categories','k2_domain'); ?>

  •        
  •        
  •             (0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
  •        
  •    
  •     } ?>
  •  
  •  
  •     /* Related Posts Plugin */ if ((function_exists('related_posts')) and is_single() and ($notfound != '1')) { ?>
  •    
    class="sb-related">
  •        

    ('Related Entries','k2_domain'); ?>

  •        
  •        
  •             (10, 0, '
  • ', '
  • ', '', '', false, false); ?>
  •        
  •    
  •     } ?>
  •  
  •  
  •     /* Include users sidebar additions */ if ( file_exists(TEMPLATEPATH . '/sidebar-custom.php') ) { include(TEMPLATEPATH . '/sidebar-custom.php'); } ?>
  •  
  •  
  • } ?>
  •  
  •  
  •  
  •  
  •  
  •  
  • class="clear">
  •  
  •  

  • PermaLink to this entry https://pastebin.co.uk/11500
    Posted by Table for Five Tue 6th Mar 2007 22:50 - Syntax is Java - 26 views
    Download | New Post | Modify | Hide line numbers

     

    Comments: 0