the_content with setup_postdata
-
Hello!
I have the following problem:
The “read more..” is not shown on my custom page, but on the index.php.
Here my code:<?php /** * @package WordPress * @subpackage Default_Theme * Template Name: Aktuelles */ global $more; $cat= 3; $posts = get_posts ("cat=$cat&showposts=5"); if ($posts) { foreach ($posts as $post): $more = false; setup_postdata($post); ?> <h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3> <p class="storycontent"><?php the_content('Read more...'); ?></p> <?php endforeach; $more = true; } ?>Thanks in advance der_ele
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘the_content with setup_postdata’ is closed to new replies.