Tag!
Da ich meine "Blog"-Seite für andere Artikeln nutze als auf Home, musste ich eine neue statische Seite erstellen und ihn durch category bestimmen. Es funktioniert bisher auch alles super, nur musste ich bei der zweiten Seite festsellen (/blog/page/2/ usw...), dass er die Artikel davor nicht anzeigt und ich weiß nicht so richtig, woran es liegt. Hier meine Blog.php:
PHP
<?php
/*
Template Name: Blog
*/
?>
<?php get_header(); ?>
<div class="span-24" id="contentwrap">
<div class="span-16">
<div id="content">
<?php if(is_home()) { include (TEMPLATEPATH . '/featured.php'); } ?>
<?php if (have_posts()) : ?>
<?php query_posts('category_name=Blog'); ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(260,200), array("class" => "alignleft post_thumbnail")); } ?>
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="postdate"><img src="<?php bloginfo('template_url'); ?>/images/date.png" /> <?php the_time('F jS, Y') ?> <img src="<?php bloginfo('template_url'); ?>/images/user.png" /> <?php the_author() ?> <img src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="" /><?php comments_popup_link(__('Keine Kommentare »', 'kubrick'), __('1 Kommentar »', 'kubrick'), __('% Kommentare »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?> <?php if (current_user_can('edit_post', $post->ID)) { ?> <img src="<?php bloginfo('template_url'); ?>/images/edit.png" /> <?php edit_post_link('Edit', '', ''); } ?> </div>
<div class="entry">
<?php the_content('<strong>Lies mehr »</strong>'); ?>
</div>
</div><!--/post-<?php the_ID(); ?>-->
<?php endwhile; ?>
<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
<div class="alignleft"><?php next_posts_link('« Ältere Einträge') ?></div>
<div class="alignright"><?php previous_posts_link('Neue Einträge »') ?></div>
<?php } ?>
</div>
<?php else : ?>
<h2 class="center">Nicht gefunden</h2>
<p class="center">Tut mir leid, du suchst nach etwas, das es hier nicht gibt</p>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
</div>
<?php get_sidebars(); ?>
</div>
<?php get_footer(); ?>
Alles anzeigen
Ich bedanke mich für eure Beiträge...