Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Blog filter and next/previous article
New Landing › How can we help? › Cardinal › Blog filter and next/previous article
- This topic has 7 replies, 2 voices, and was last updated 7 years by David Martin – Support.
-
Posted in: Cardinal
-
March 2, 2017 at 10:56 am #315734
Hi,
I’ve got a problem with blog category filter.
In the “news”, I stated that should be shown just articles in the “news” category.
The initial filter works correctly but, when I read a single post, the next/previous article doesn’t respect this filter.
As you can see in the first picture (filter categories.png), the next article is ok but the previous is not.
I also setted the flag in the theme options (filter categories 2.png) for the “same category post navigation” but nothing changed.
Same behaviour in another blog section where I setted the blog option to show just articles categorized as “DN15-16”.Thanks.
PS: every time I edit something in the theme options, <br>’s in the footer are always deleted also if I leave it in text mode visualization…
Attachments:
You must be logged in to view attached files.March 3, 2017 at 3:23 pm #315901It’s because the posts have more then one Category. The single nav is not limited to the ‘News’ category you have selected, rather the category the post has.
March 3, 2017 at 3:33 pm #315906As you can see in the first picture, the “previous article” (AUGURI) has a category (Archivio) completely different from the one actually shown (DN15-16 and News).
Moreover, what does it means the flag “Same category post navigation”? The description seems very clear: “Enable this if you would like to set it so that the SINGLE POST pagination only includes items within the same category”.March 6, 2017 at 2:33 pm #316036Ah yes, I do see your issue. Please install and activate the supplied child theme, inside the child theme
functions.php
file paste this code. let me know if that resolves the issue.https://gist.github.com/webadelic/6124466ec7c3ee0e92c23697e675a5d5
March 6, 2017 at 3:23 pm #316053Thank you David, that’s almost perfect.
As you told me before, it’s not filtered for the category setted in the Blog Swift Page Builder, but has one of the category in the shown article.
What you gave me is a good starting point to reach what I wish.
Can you tell me if, in the function you gave me, do I know the categories setted in the Page Builder?
I mean, in that function do I have an array with the starting categories (not the categories of the shown article)?Thanks a lot.
F.
March 7, 2017 at 6:21 pm #316268Hi,
Glad to help where possible.
It will only stay within the current posts category. Not the post category set within the theme options.
March 7, 2017 at 6:27 pm #316270I see.
So the only solution is to mark articles with single categories that belongs to the one set within the theme options?March 8, 2017 at 7:00 pm #316437Yes, that would work.
Thanks.
-
Posted in: Cardinal
You must be logged in to reply to this topic.