kalponikoronno

arhcive php

Feb 19th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.19 KB | None | 0 0
  1. <h1><?php if (have_posts()) : ?>
  2.                 <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  3.                         <?php /* If this is a category archive */ if (is_category()) { ?>
  4.                                 <?php _e('Archive for the', 'brightpage'); ?> '<?php echo single_cat_title(); ?>' <?php _e('Category', 'brightpage'); ?>                                                                      
  5.                         <?php /* If this is a tag archive */  } elseif( is_tag() ) { ?>
  6.                                 <?php _e('Archive for the', 'brightpage'); ?> <?php single_tag_title(); ?> Tag
  7.                         <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  8.                                 <?php _e('Archive for', 'brightpage'); ?> <?php the_time('F jS, Y'); ?>                                                                        
  9.                         <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  10.                                 <?php _e('Archive for', 'brightpage'); ?> <?php the_time('F, Y'); ?>                                                                  
  11.                         <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  12.                                 <?php _e('Archive for', 'brightpage'); ?> <?php the_time('Y'); ?>                                                                              
  13.                         <?php /* If this is a search */ } elseif (is_search()) { ?>
  14.                                 <?php _e('Search Results', 'brightpage'); ?>                                                  
  15.                         <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  16.                                 <?php _e('Author Archive', 'brightpage'); ?>                                                                          
  17.                         <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  18.                                 <?php _e('Blog Archives', 'brightpage'); ?>                                                                            
  19.         <?php } ?>                                    
  20. </h1>
Advertisement
Add Comment
Please, Sign In to add comment