Tagged: Tags, You Might Also Like
Hi,
I have several posts with “portrait”, “landscape” or both tags assigned and this is done for masonry gallery purposes. The issue here is that these posts show up in the “You might also like” section because of these tags even thought these posts are not related otherwise.
How can entries can excluded from the “You might also like” section for entries that have only portrait and/or landscape tags?
It’s a straight forward issue but here’s the web site: http://www.tameez.com.
Regards,
Tameez
Hi,
Open related-posts.php and look for this block:
foreach ($tags as $tag) {
$tag_ids[] = (int)$tag->term_id;
}
Replace it by this:
foreach ($tags as $tag) {
$tag_ids[] = (int)$tag->term_id;
if($tag->slug == 'landscape' || $tag->slug == 'portrait') array_pop($tag_ids);
}
Regards,
Josue
Hi Josue,
I believe that did work. Thank you very much and please close the ticket.
Regards,
Tameez
You are welcome, glad to help :)
Regards,
Josue
FYI, this will be fixed in the next release.