i am using the wordpress site; in my home page it having like this <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> then it will shows the all recent posts, but i want recent posts but from 2nd post only to display thats i want what i have to do..........,
You can try this if you are trying to view all posts from 2nd <?php if (have_posts()) : ?> <?php $postId = 0; while (have_posts()){ if( $postId != 0) { the_post(); } $postId = $postId +1; } ?> Code (markup): I am not sure what the the_post(); function does though
god why so complicated? $postId = $postId +1; no way! Simply do this: if(have_posts()) : have_posts(); while(have_posts()): the_post(); endwhile; endiff; Code (markup): What will this do? Simply pass from the first post to the other have_posts goes from post number one too number two If you liked it, say thanks and I'll give you a cookie It simply files variables like $post->ID with the right information. Function like the_content and the_excerpt require the_post function to run in order to know where to extract the info from.
matthewrobertbell, wrong code, u can see, that function the_post not return text, she display his. HivelocityDD, ou.. agilius, i m too suprized at the complexity