Tagged: related entries, related posts
Hi,
Ihm trying to build a “related posts” section. Currently I am using the YARPP plugin, but I noticed there is an integrated version in enfold. I tried to find some advice in this forum but unfortunately it does not make any sense. I’m using the ALB for my Blogpost and I enabled the “related Entries” in my blog layout. Can someone please help?
Tank you very much,
Sincerely,
Veronika
Hey Veronika,
Thank you for the inquiry.
You can use any elements such as magazine, blogs posts or masonry elements to display related entries. Just select the same category as the current post and make sure to set Content > Filter > Offset Number to the second option to disallow duplicate post.
You can also use this filter in the functions.php file.
/*
Removing duplicate blog post (Blog post element must not have offset activated)
*/
add_filter('avia_post_slide_query', 'enfold_customization_query_custom');
function enfold_customization_query_custom( $query ) {
global $post;
if ( is_single() ) {
$query['post__not_in'] = array($post->ID);
}
return $query;
}
Best regards,
Ismael