I am using Post contents as a slider contents, i need to make the post infinite number of loop, ie, If i view the last post after that first post should display and before first post the last post.
A very basic example,
Note, that this is probably an inefficient way to achieve what you want because if your
To improve performance you should restrict your slider content to a special category and use the category parameter
Better still, I'd personally confine my slides to a custom post type and add
Its important that you read http://codex.wordpress.org/Class_Reference/WP_Query which contains a great deal of information surrounding the various parameters you can use with WP_Query to achieve custom control of what data you retrieve.
If you're loading these as slides, you're probably looking at this problem wrong. You don't need to infinitely loop through the posts with PHP, you just need to present them once to the slider and makes sure it can manage repeating. What slider are you using?