I followed the tutorial by Nick the Geek here: http://designsbynickthegeek.com/tutorials/related-posts-genesis
And have been trying to include the excerpt with the post title and image, but am unable to make it work.
Would any of your brilliant people have any idea or a simple way to achieve this?
Thanks in advance.
If you’ve got it outputing ok and just need to add the excerpt then find the following line:
$related .= ‘<a href= … …‘;
and change it to:
add in get_the_excerpt()
More information on get_the_excerpt here: http://codex.wordpress.org/Function_Reference/get_the_excerpt
Brilliant thanks, obvious now I look at it.
This was the final code:
$related .= ‘<li><a href=”‘ . get_permalink() . ‘” rel=”bookmark” title=”Permanent Link to ‘ . get_the_title() . ‘”>’ . $img . get_the_title() . ‘</a>’ . get_the_excerpt() . ‘</li>’;
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.