-
AuthorPosts
-
September 11, 2017 at 6:32 pm #850622
Hallo,
ich habe eine Frage zum “Einträge-Slider”.
Ich habe mehrere Beiträge in der Kategorie “X”. Jeder dieser Beiträge hat einen “Einträge-Slider”, der alle Beiträge aus der Kategorie “X” listet.
Leider wird auch der gerade “aktive” Beitrag gelistet – wie kann ich es einstellen, dass der gerade “aktive” Beitrag nicht im Slider ausgegeben wird?Vielen Dank,
NeverlandsSeptember 11, 2017 at 9:49 pm #850682Sorry, totally forgot to write in English.. You can delete the one above.
I have a question concerning the “Post Slider”.
I have several posts wihtin the category “X”. Each of those posts has a “Post Slider” that shows all posts from category “X”.
Unfortunatley the “active” post is also shown in the slider – what can I do that only the other posts of the category are shown but not the active one?Many thanks,
NeverlandsSeptember 12, 2017 at 9:23 am #850895Hi Neverlands,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaSeptember 12, 2017 at 1:50 pm #850989H Victoria,
thanks for your reply!
You find the admin access in the private data.Best regards,
NeverlandsSeptember 12, 2017 at 4:44 pm #851087Hi Neverlands,
Here is the code you can put in your funtions.php
add_filter('avia_post_slide_query', 'avf_custom_post_grid_query'); function avf_custom_post_grid_query ( $query ) { if(is_singular('post')) { global $post; $query['post__not_in'] = array($post->id); } return $query; }
If you need further assistance please let us know.
Best regards,
VictoriaSeptember 12, 2017 at 5:27 pm #851122Hi Victoria,
thanks for the code!
Unfortunately it did not change anything.
More details in the private data..Best regards,
NeverlandsSeptember 14, 2017 at 6:13 am #851832Hi,
We modified the code a bit. Please remove browser cache or hard refresh before checking the page.
Best regards,
IsmaelSeptember 14, 2017 at 11:57 am #852005Hi Isamel,
many thanks – it works perfectly now!
Is this the code I have found in the functions.php of the child theme?:
/* Einträge Slider aktiven Beitrag ausblenden */ add_filter('avia_post_slide_query', 'avf_custom_post_grid_query'); function avf_custom_post_grid_query ( $query ) { if(is_singular('post')) { global $post; $query['post__not_in'] = array($post->ID); } return $query; }
Do I have to take care about something with the next Enfold theme update?
Best regards,
NeverlandsSeptember 15, 2017 at 5:43 am #852400 -
AuthorPosts
- You must be logged in to reply to this topic.