Moin zusammen.
Ich will auf einer statischen Seite nur Beiträge einer bestimmten Kategorie darstellen.
Das klappt jetzt auch schon sehr gut.
Nur funktioniert der "Read more" Button nicht.
Ich habe die Vermutung, dass dies mit dem query_posts zusammenhängt, finde den Fehler aber nicht.
Im Folgenden der besagte Loop:
PHP
<?php query_posts('cat=7');
if (have_posts())
{
while (have_posts())
{
the_post();
?>
<div id="page-<?php echo the_ID();?>" class="<?php echo $alternate;?>">
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<?php if ( get_post_meta($post->ID, 'heading', true) )
{
?>
<h4><?php echo get_post_meta($post->ID, "heading", $single = true); ?></h4>
<?php
}
?>
<p class="categor"><strong>Posted:</strong> under <?php the_category(', ') ?>.<br />
<?php the_tags('Tags: ', ', ',''); ?><?php edit_post_link('[e]',' | ',''); ?></p>
<div class="post-body">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<p class="date"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/comment.gif" alt="" />
<a href="<?php comments_link(); ?>" class="entryComment">Comments (<?php comments_number('0', '1', '%'); ?>)</a>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/timeicon.gif" alt="" /><?php strtoupper(the_time('M d Y')) ?></p>
</div>
<?php
$i++;
}
?>
<?php if($wp_query->max_num_pages > 1)
{
//Pagination
?>
<div class="navigationbottom">
<div class="leftnav"><?php next_posts_link('« Older Entries') ?></div>
<div class="rightnav"><?php previous_posts_link('Newer Entries »') ?></div>
<div style="clear:both"></div>
</div>
<?php
}
?>
Alles anzeigen
Vielleicht könnt ihr mir ja weiterhelfen...
Grüße,
der Fekkon