ich habe einer statischen seite (news) ein template zugewiesen. das soll als 'blog' fungieren, da ich wp als cms einsetze.
also alle news cat einträge sollen da ausgegeben werden. funktioniert auch.
nur bei der navigation zu seite 2 werden mir die gleichen beiträge angezeigt.
-> http://www.gute-seiten.net/blog/news
-> http://www.gute-seiten.net/blog/news/page/2
irgendwie nutzt wp dann auch nicht mehr das template, da bilder fehlen. welche seite ruft wp dann auf oder will aufrufen?
im nächsten schritt muss da noch ne suche rein und unterkategorien für news mit jeweiligen links.
PHP
<?php
/*
Template Name: news
*/
?>
<?php get_header(); ?>
<?php query_posts('cat=18'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_date('','<h2>','</h2>'); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_tags(__('Tags: '), ', ', ' — '); ?> <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div>
<div class="storycontent">
<?php the_content(__('(more...)')); ?>
</div>
<div class="feedback">
<?php wp_link_pages(); ?>
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
</div>
</div>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php posts_nav_link(' — ', __('« Newer Posts'), __('Older Posts »')); ?>
<?php get_footer(); ?>
Alles anzeigen