-
AuthorPosts
-
August 8, 2017 at 2:18 pm #835845
Dear Kriesi team,
in the blog there is this prev and next function. I would like to have the behaviour, that it “stays” within one category. Perfect would be no arrow at the first and last article.
I found this funcion here in the forum:
/* Blätterfunktion in Blog & Presse nur innerhalb der eigenen Kategorie */
add_filter(‘avia_post_nav_categories’, ‘use_same_category_filter’);
function use_same_category_filter($same_category)
{
$same_category = true;
return $same_category;
}But it doesn’t work and sticks to chronological sorting.
How can I fix this?
Thank you in advance!
KatiAugust 12, 2017 at 7:39 am #837769Hey prudsys,
Can you give us temporary admin access as well as ftp access? so we can try to check why it doesn’t work.
Best regards,
NikkoAugust 16, 2017 at 7:57 am #839752Sorry Nikko,
it took me a while to get access for you. Here we are.
The code above is in the functions.php of our chilt theme.
Regards,
KatiAugust 21, 2017 at 7:06 pm #842172Hi,
I just tried the code and it is working properly.
The function has not changed at all, so there is something wrong on your implementation.
Please do make sure that you paste the code on functions.php file.Thank you for your understanding
Best regards,
BasilisAugust 22, 2017 at 8:10 am #842355Hi Basilis,
thanks for your effort. The function _IS_ in functions.php but not working. Did you have a look at our functions.php? Maybe something in there stops the code from working properly? I tried position at the end and in the beginning of functions.php but it mixes categories. :(
Regards,
KatiAugust 24, 2017 at 1:37 pm #843478Hey Basilis,
this piece of code seems to work for us:
add_filter(‘avia_post_nav_settings’,’avia_same_category_filter’, 10, 1);
function avia_same_category_filter($settings)
{
$settings[‘same_category’] = true;
return $settings;
}
I also found it in your forum here, so thank you anyway.Best regards,
KatiAugust 25, 2017 at 9:18 am #843803 -
AuthorPosts
- You must be logged in to reply to this topic.