Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #608548

    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

    #608619

    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

    #608626

    Hi Josue,

    I believe that did work. Thank you very much and please close the ticket.

    Regards,

    Tameez

    #608691

    You are welcome, glad to help :)

    Regards,
    Josue

    #640939

    FYI, this will be fixed in the next release.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Exclude "portrait" and "landscape" tags from "You might also like" area’ is closed to new replies.