New Landing How can we help? Cardinal Blog filter and next/previous article

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Cardinal
  • #315734
    theFencer
    Member
    Post count: 27

    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.
    #315901
    David Martin – Support
    Moderator
    Post count: 20834

    It’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.

    #315906
    theFencer
    Member
    Post count: 27

    As 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”.

    #316036
    David Martin – Support
    Moderator
    Post count: 20834

    Ah 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

    #316053
    theFencer
    Member
    Post count: 27

    Thank 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.

    #316268
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Glad to help where possible.

    It will only stay within the current posts category. Not the post category set within the theme options.

    #316270
    theFencer
    Member
    Post count: 27

    I see.
    So the only solution is to mark articles with single categories that belongs to the one set within the theme options?

    #316437
    David Martin – Support
    Moderator
    Post count: 20834

    Yes, that would work.

    Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.