doesn´t quiet do, what was supposed to..
I just need a independent site where the five latest entries are displayed like <?php the_content(‘Go on »’); ?>
possible at all?
After:
foreach ($posts as $post) :
add
start_wp();
or in WordPress 1.5+, you can use:
setup_postdata($post);
Whichever one you go with, it’s sort of required for the_content().
yes, you´re right now I can use the content but only the whole content something like
[code]<?php the_content('Go on »'); ?>[/code]
doesn´t work at all :/
1. now I can use the content but only the whole content
What does whole content refer to? What are other types of content?
2. something like
[code]<?php the_content('Go on »'); ?>[/code]
doesn´t work at all :/
What does work?
3. Why the link I gave you above does not do what you want?
I’m having this problem too, I want the homepage to display specifics, eg the last 5 posts in category1, and the last 6 posts from category2. [code]<?php the_content('Read the rest of this entry...»'); ?>[/code] works, but it displays the entire post, disregarding where <!–more–> should kick in.
I had an idea for index.php – [code] if (URLrequestedVariable(?) == $_SERVER['DOCUMENT_ROOT']) { special index by category case } else { standard if (have_posts()) : loop. [/code]
http://codex.wordpress.org/The_Loop#Multiple_Loops_Version_1
2nd example
I just verified myself with WP 1.5.1.2 that more tag is applied.
Post your code here. http://pastebin.com
@ kafkaesqui
[code] <?php
$posts = get_posts('numberposts=5');
foreach ($posts as $post) : setup_postdata($post);
?>
<h4>" rel="bookmark"><?php the_title(); ?></h4>
<div class="post"><?php the_content('More »'); ?></div>
<p class="custom"><?php the_time('d. F Y ') ?> abgelegt in <?php the_category(', ') ?> | <?php edit_post_link('Edit','',''); ?>
<?php
endforeach;
?>[/code]
doens´t work 🙁
@ alphaoide
I tried your suggestion, but didn´t get it to work, could you post a working example?
[code][code] <?php
$posts = get_posts('numberposts=5');
foreach ($posts as $post) : setup_postdata($post);
?>
<h4>" rel="bookmark"><?php the_title(); ?></h4>
<div class="post"><?php the_content(); ?></div>
<p class="custom"><?php the_time('d. F Y ') ?> abgelegt in <?php the_category(', ') ?> | <?php edit_post_link('Edit','',''); ?>
<?php
endforeach;
?>[/code]
works fine
[code][code] <?php
$posts = get_posts('numberposts=5');
foreach ($posts as $post) : setup_postdata($post);
?>
<h4>" rel="bookmark"><?php the_title(); ?></h4>
<div class="post"><?php the_content('More »'); ?></div>
<p class="custom"><?php the_time('d. F Y ') ?> abgelegt in <?php the_category(', ') ?> | <?php edit_post_link('Edit','',''); ?>
<?php
endforeach;
?>[/code]
as I need it with the 'More'-option doesn´t..
Do not post code here.
Read the posts before yours please.
The “More »” example works for me (that is, as one would expect it to–with the more link appearing with posts that use the more quicktag).
What version of WP are you running?