How can I show the content in next or previous post?
For example, I use this to display the next post link with title:
<div class="alignleftfp">
<?php next_post_link('%link', '%title'); ?>
</div>
<div class="alignrightfp">
<?php previous_post_link('%link', '%title'); ?>
</div>
Is it possible to show the content of that post (100 Words)?
Take a look at the
get_adjacent_post
function.It takes three paramters, all of which are optional:
Hence the previous post, regardless of category can be retrieved via
and the next via
If successful, the function will return a complete post object, hence:
should do.