Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1328379

    Hi,
    in this page (among others)we are using a post slider item to show related post based on a post tag selection.

    We selected the do not allor duplicates (offset number automatically)
    https://nimb.ws/UBVu46

    But, as you can see, the current post is shown as the first related post.

    Can you please assist with this issue?
    Thanks!

    #1328695

    Hey,

    Thanks for contacting us!

    Could you please update the theme to the latest version – https://kriesi.at/documentation/enfold/theme-update/ and check if that helps? If it does not, please try switching to Enfold parent theme temporarily so we can see if it is related to the changes made on child theme :)

    Best regards,
    Yigit

    #1328762

    Hi Yigit,
    thanks for your reply.
    I’ve updated to the latest verion 4.8.7.1 and it doesn’t help.
    I’ve switched to the parent theme and it doesnt help either.
    We are running a staging copy, so you can check it here: https://srgl.it/inorto/coltivare/tecniche-di-coltivazione/coltivare-il-fagiolo-semina-periodo-concimazione-luna-rotazione/

    Just to be sure, I’ve also deactivated all the other plugin.
    So it seems that I’m doing something wrong somwhere.

    I’d expect not to see the post “Coltivare il fagiolo: semina, concimazione, luna, rotazione e consociazione” in the related posts at the bottom, Is that right?

    Hope to hear from you soon.
    Thanks!

    #1329023

    Hi,

    Thank you for the inquiry.

    You may need to add this filter in the functions.php file to exclude the current post from the blog posts query.

    add_filter("avia_post_slide_query", function($query) {
        if(is_singular('post')) {
            $query['post__not_in'] = array(get_the_ID());
        }
        return $query;
    }, 10, 1);
    

    Best regards,
    Ismael

    #1329069

    Hi Ismael,
    thank you for you reply.

    I added the code in the parent and in the child theme but in no one of them the trick seems to work.

    Can you please assist?
    Thanks!

    #1329099

    Hi,

    Thank you for the update.

    There was a minor syntax error in the code above. We corrected it just now. Please make sure to purge the cache after adjusting the code.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.