Where do you add the “You might also like” section that can be seen on this page: http://kriesi.at/themes/enfold/2012/12/12/lorem-ipsum-dolor-sit-amet-consectetuer-adipiscing-elit-aenean-commodo-ligula-eget-dolor-aenean-massa/
and where do you manage it? I mean how do you decide which posts are picked up as in latest ones or oldest ones? What if I want a certain post from a different tag to show in that area but it is a different unique page or maybe an ad? Does that area only pick the same tags? Randomize them or are they only the latest posts?
It would be great if this was a widgeted area or a custom section like the footer that could be managed instead of being dynamically generated with little controls :)
Hey Monsoon!
The code can be found in /wp-content/themes/enfold/includes/related-posts.php – we use a tag query to query some posts which share one or more tags with the current post. Sticky posts are ignored and the order is set to “random”. If you want to modify the query parameters (i.e. order the posts by title or date search for
$my_query = get_posts(
array(
'tag__in' => $tag_ids,
'post_type' => get_post_type($this_id),
'showposts'=>$postcount, 'ignore_sticky_posts'=>1,
'orderby'=>'rand',
'post__not_in' => array($this_id))
);
and change the query parameters based on your requirements. Adding a different unique page or an ad is not possible without rewriting/customizing the related posts template. I recommend to search for third party ad plugins which allow you to embed the ads with shortcodes into the post content. Then you could add the shortcode at the very end of the post to show some ads above the related post section.
Regards,
Peter
Hello,
How can I have a short code of you might also like feature.