Digitalraindrops

Artisteer 2.5 archive.php with WP Pagenavi

Sep 18th, 2010
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.75 KB | None | 0 0
  1. <?php
  2. get_header();
  3. if (have_posts())
  4. {
  5.     $post = $posts[0];
  6.     $title = '';
  7.     if (is_category()){
  8.         $title .= single_cat_title('', false);
  9.     } elseif( is_tag() ) {
  10.         $title .= sprintf(__('Posts Tagged &#8216;%s&#8217;', 'kubrick'), single_tag_title('', false) );
  11.     } elseif( is_day() ) {
  12.         $title .= sprintf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_date());
  13.     } elseif( is_month() ) {
  14.         $title .= sprintf(_c('Archive for %s|Monthly archive page', 'kubrick'), get_the_date('F Y'));
  15.     } elseif( is_year() ) {
  16.         $title .= sprintf(_c('Archive for %s|Yearly archive page', 'kubrick'), get_the_date('Y'));
  17.     } elseif( is_author() ) {
  18.         $title .= __('Author Archive', 'kubrick');
  19.     } elseif( isset($_GET['paged']) && !empty($_GET['paged']) ) {
  20.         $title .= __('Blog Archives', 'kubrick');
  21.     }
  22.     art_page_navi($title);
  23.     while (have_posts())  
  24.     {
  25.         art_post();
  26.     }
  27.     /* Start add page navigation to index page */
  28.     if(function_exists('wp_pagenavi') ) {
  29.         wp_pagenavi();
  30.     } else {
  31.     art_page_navi();
  32.     }
  33.     /* End add page navigation to index page */
  34. } else {    
  35.     $title = '';
  36.     if ( is_category() ) {
  37.         $title .= sprintf(__("Sorry, but there aren't any posts in the %s category yet.", "kubrick"), single_cat_title('',false));
  38.     } else if ( is_date() ) {
  39.         $title .= __("Sorry, but there aren't any posts with this date.", "kubrick");
  40.     } else if ( is_author() ) {
  41.         $userdata = get_userdatabylogin(get_query_var('author_name'));
  42.         $title .= sprintf(__("Sorry, but there aren't any posts by %s yet.", "kubrick"), $userdata->display_name);
  43.     } else {
  44.         $title .= __('No posts found.', 'kubrick');
  45.     }
  46.     art_post_box(
  47.         $title,
  48.         '<p class="center">' .  __('No posts found. Try a different search?', 'kubrick') . '</p>'
  49.         .  "\r\n" .art_get_search());
  50. }
  51.  
  52. get_footer();
Add Comment
Please, Sign In to add comment