Tagged: blog posts, post slider, specific
Hi Kriesi Team,
I am trying to build a more prominent related articles section within my posts to highlight 3 or 4 key related articles. I want to do this with a post slider as seen here: http://thepsychreport.com/essays-discussion/thinking-appropriately-about-climate-change/
But the problem is that when I use a post tag to generate the slider I have to offset by one post, the current post. This is fine until I public another article with that tag, which means that I have to go back to the previous article and offset by 2 posts and so on to ensure that the post someone just read doesn’t show up in the related articles for that post.
Is there a way to exclude specific posts from a post slider? If this was the case I could create a post slider once when I originally write the article and then it will self-update in the future. (I am assuming the same logic could apply to the blog posts feature)
Thanks for you help,
Evan
Hey enester1!
Did you try the “Do not allow duplicates” option: http://www.clipular.com/c/5291868245983232.png?k=FmYH58ADN_wVXqoeJJTpy9KCeqk ? If it doesn’t work on the single post page please insert this code at the very bottom of functions.php
function avia_set_the_post_ID()
{
global $avia_config;
$ID = get_the_ID();
if($ID) $avia_config['posts_on_current_page'][] = $ID;
}
add_action('wp_head', 'avia_set_the_post_ID');
– it should add the single post ID to the “duplicate” lists and remove it from the post slider
Cheers!
Peter