-
AuthorPosts
-
December 2, 2019 at 9:01 pm #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
December 6, 2019 at 8:50 pm #1163454Hey GaWi,
This single post pages have been created with Advanced Layout Builder?
Best regards,
BasilisDecember 6, 2019 at 9:01 pm #1163458Hey Basilis,
Yes, they are made with Advanced Layout Builder.
Greets GabiDecember 9, 2019 at 8:53 pm #1164178Hi,
The issue seems to be this then. We would need to check a little bit more about the status of the problem.
Best regards,
BasilisDecember 14, 2019 at 11:48 am #1165837Hey 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 GabiDecember 17, 2019 at 3:38 am #1166644Hi,
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,
IsmaelDecember 18, 2019 at 8:48 pm #1167495Hi 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}
thrownPerhaps I did something wrong?
Greets Gabi
December 19, 2019 at 8:19 pm #1167901Hi 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,
VictoriaDecember 20, 2019 at 12:09 pm #1168090Hi Victoria,
fabulous! It works. Thank for your help!
Like allways phantastic support!
Greets GabiDecember 20, 2019 at 3:48 pm #1168172Hi 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 -
AuthorPosts
- The topic ‘single post with magazine shows twice the post’ is closed to new replies.