Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1162002

    Hey there,
    I have single-post pages. At the right side I use the magazine to show other posts. If I select “Do not allow duplicate posts in the entire page” it doesn´t work, it shows the same post.
    Is there any solution?

    Greets Gabi

    #1163454

    Hey GaWi,

    This single post pages have been created with Advanced Layout Builder?

    Best regards,
    Basilis

    #1163458

    Hey Basilis,
    Yes, they are made with Advanced Layout Builder.
    Greets Gabi

    #1164178

    Hi,

    The issue seems to be this then. We would need to check a little bit more about the status of the problem.

    Best regards,
    Basilis

    #1165837

    Hey Basilis,
    do you need any mor information? Can it be resolved? Beginning of january the site goes online. The client will care about the content by himself. So it would be nice to have the issue resolved.
    Greets Gabi

    #1166644

    Hi,

    Thank you for the update.

    You can use this filter in the functions.php file to exclude the current post in the magazine element.

    dd_filter('avf_magazine_entries_query','avf_magazine_entries_query_mod', 10, 2);
    function avf_magazine_entries_query_mod($query, $params)
    {
        if(is_singular('post')) {
            $query['post__not_in'] = array(avia_get_the_ID());
        }
        return $query;
    }
    

    Best regards,
    Ismael

    #1167495

    Hi Ismael,
    thanks for answering. I puted in the functions.php. It didn´t work. I got folowwing message:
    Uncaught Error: Call to undefined function dd_filter() in wp-content/themes/enfold-child/functions.php:10
    Stack trace:
    #0 wp-settings.php(497): include()
    #1 wp-config.php(80): require_once(‘/homepages/10/d…’)
    #2 wp-load.php(37): require_once(‘/homepages/10/d…’)
    #3 wp-admin/admin.php(34): require_once(‘/homepages/10/d…’)
    #4 wp-admin/theme-editor.php(10): require_once(‘/homepages/10/d…’)
    #5 {main}
    thrown

    Perhaps I did something wrong?

    Greets Gabi

    #1167901

    Hi GaWi,

    Oh, it has to be add_filter(), I think it got lost above, add it like this:

    
    add_filter('avf_magazine_entries_query','avf_magazine_entries_query_mod', 10, 2);
    function avf_magazine_entries_query_mod($query, $params)
    {
        if(is_singular('post')) {
            $query['post__not_in'] = array(avia_get_the_ID());
        }
        return $query;
    }
    

    Best regards,
    Victoria

    #1168090

    Hi Victoria,
    fabulous! It works. Thank for your help!
    Like allways phantastic support!
    Greets Gabi

    #1168172

    Hi Gabi,

    We’re glad to hear that and thank you for your kind words to our support team :)
    Thanks for using Enfold and have a great weekend!
    Merry Christmas! :)

    Best regards,
    Nikko

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘single post with magazine shows twice the post’ is closed to new replies.