Manually Define to Show Full Post or Excerpt on Your WordPress Homepage

Are you using excerpts or full posts on your blog posts homepage? By default, there is no way to use both excerpts and full posts on your blog homepage at the same time. However there is a hack that can enable that. This way you can show full post and excerpts at the same homepage. Here’s a hack to do it.


On your index.php file, replace your current loop by this one:

while (have_posts()) : the_post();
$customField = get_post_custom_values("full");
if (isset($customField[0])) {
//Custom field is set, display a full post
} else {
// No custom field set, let's display an excerpt

The code above, default is displaying excerpts. If you want to show a full post on your blog homepage, simply edit the post and create a custom field named full and give it any value.