Hallo Community,
nachdem ich nun über die Ostertage das Problem nicht alleine lösen konnte, suche ich nun Hilfe, um mein Problem zu lösen.
Problem:
Ich habe mir mit Custom Post Types eine Datenbank zu Filmkritiken angelegt.
Name des CPT: kritiken
Zusätzlich gibt es Taxonomies wie Regie, Jahr, Land, etc.
Soweit funktioniert auch alles, auf einer extra Seite werden die Filme per
ausgegeben.
Was nicht klappt, ist die Pagination. Es werden unter dem Query zwar die Seitenzahle ausgegeben, klickt man jedoch darauf, kommt ein 404 Fehler.
Siehe hier: http://www.insidemovie.de/kritiken/
Ich verzweifle und wäre für jeden Tipp dankbar. Seit Freitag beschäftigt mich dieses Problem und ich bekomme es einfach nicht gelöst.
Hier der komplette Code meiner single-kritiken.php
<?php
/*
* Template Name: Page Kritiken
*/
?>
<?php get_header(); ?>
<!-- BEGIN MAIN -->
<div id="main">
<div class="block archive">
<h3>
Kritiken
<span class="arrows">»</span>
</h3>
<!-- Abruf aller Artikel des Custom Post Types Kritiken -->
<?php query_posts( 'post_type=kritiken'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('block-item-big'); ?>>
<?php
if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
$icon = '<span class="' . get_post_format($post->ID) . '-icon"></span>';
} else {
$icon = '';
}
?>
<?php if(has_post_thumbnail()): ?>
<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'pt_kritiken_thumbnail_small'); ?>
<div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" width='120' height='170' /></a><?php echo $icon; ?></div>
<?php else: ?>
<div class="block-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php bloginfo('template_directory'); ?>/images/thumbnail.png&w=290&h=160" alt="<?php the_title(); ?>" width='290' height='160' /></a><?php echo $icon; ?></div>
<?php endif; ?>
<h2><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><?php the_title(); ?></a></h2>
<span class="block-meta">
<span class="heading-author"><?php the_author(); ?></span>
<span class="heading-date"><?php the_time('F j, Y'); ?></span>
<span class="heading-comments"><?php comments_popup_link('0','1','%'); ?></span>
</span>
<p><?php echo string_limit_words(get_the_excerpt(), 34); ?></p><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>' class="readmore"><?php _e('Read More', 'Avenue'); ?> <span class="block-arrows">»</span></a>
</div>
<?php endwhile; endif; ?>
<?php kriesi_pagination($pages = '', $range = 2); ?>
</div>
</div>
<!-- END MAIN -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen
Danke für die Hilfe und schöne Ostern noch!
Viele Grüße
Marco