Hallo zusammen,
ich habe gerade mit Erschrecken festgestellt, dass auf meiner Seite http://www.ingenieur360.de/ die Pagination im Theme Mimbo nicht funktioniert. Klickt man auf "Ältere Beiträge" sagt das Template, dass die Seite nicht gefunden wurde. Das hier sind die Quellcodes:
[COLOR=Green]archives.php[/COLOR]
PHP
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; ?>
<?php if (is_category()) { ?>
<h2 class="pagetitle"><?php _e('','Mimbo'); ?> <?php single_cat_title(); ?> </h2>
<?php echo category_description(); ?>
<?php } elseif( is_tag() ) { ?>
<h2 class="pagetitle"><?php _e('Tag archive for','Mimbo'); ?> ‘<?php single_tag_title(); ?>’</h2>
<?php the_excerpt(); ?>
<?php } elseif (is_day()) { ?>
<h2 class="pagetitle"><?php _e('Date archive for','Mimbo'); ?> <?php the_time('F jS, Y'); ?></h2>
<?php } elseif (is_month()) { ?>
<h2 class="pagetitle"><?php _e('Date archive for','Mimbo'); ?> <?php the_time('F, Y'); ?></h2>
<?php } elseif (is_year()) { ?>
<h2 class="pagetitle"><?php _e('Date archive for','Mimbo'); ?> <?php the_time('Y'); ?></h2>
<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle"><?php _e('Blog Archives','Mimbo'); ?></h2>
<?php } ?>
<ul class="archive-list clearfloat">
<?php while (have_posts()) : the_post(); ?>
<?php include (TEMPLATEPATH . '/archivelist.php'); ?>
<?php endwhile; ?>
</ul>
<?php include (TEMPLATEPATH . '/pagination.php'); ?>
<?php else : ?>
<h2><?php _e('Leider kein Ergebnis gefunden','Mimbo'); ?></h2>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen
[COLOR=Green]archives.php[/COLOR]
PHP
<?php
/*
Template Name: Archives
*/
?>
<?php get_header(); ?>
<div id="content">
<div class="post">
<?php
add_filter('post_limits', 'my_post_limit');
global $myOffset;
$myOffset = 1;
global $postsperpage;
$postsperpage = 10; //Number of posts per page
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('caller_get_posts=1&orderby=post_date&order=DESC&offset='.$myOffset.'&showposts='.$postsperpage.'&paged='.$paged);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<?php
setup_postdata($post);
$year = mysql2date('Y', $post->post_date);
$month = mysql2date('n', $post->post_date);
$day = mysql2date('j', $post->post_date);
?>
<?php if($year != $previous_year || $month != $previous_month) : ?>
<?php if($ul_open == true) : ?>
</ul>
<?php endif; ?>
<h2 class="pagetitle"><?php the_time('F Y'); ?></h2>
<ul class="fullarchive">
<?php $ul_open = true; ?>
<?php endif; ?>
<?php $previous_year = $year; $previous_month = $month; ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<?php include (TEMPLATEPATH . '/pagination.php'); ?>
<?php $wp_query = null; $wp_query = $temp;?>
<?php remove_filter('post_limits', 'my_post_limit'); ?>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen
pagination.php
PHP
<div class="clearfloat" id="pagination">
<div class="left"><?php next_posts_link(__('«Ältere Beiträge','Mimbo')); ?></div>
<div class="right"><?php previous_posts_link(__('Neuere Beiträge»','Mimbo')); ?></div>
</div>
Hat jemand eine Idee, wo der Fehler liegt? Ich habe mich schon durchprobiert, aber das Problem nicht finden können.
VIELEN DANK!
Gruß,
Marcel