Mantra – Category Archive page 2+

  • Author
    Posts
  • #121978

    Hi.

    If you navigate to the URL of a post-category everything is fine. (https://yoursite.com/yourcategory/)

    But if you try to navigate to page 2 at the bottom of the page (https://yoursite.com/yourcategory/page/2/), you get the “Page not Found” error.

    Website: redzoneracing.no

    #122287
    Zed
    Cryout Creations mastermind

    Hi,

    URLs are handled by WordPress, not the theme. Double-check your permalink settings (and re-save settings to ensure the rules currently applying are in sync with what WordPress is expecting).


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #122310

    Hi Zed.

    I have re-saved the permalink settings, but it still did not work.

    I have also tried to apply the default WP theme “Twenty Twenty One”, where it works just as it should.

    Switching back to the Mantra theme, it stops working again.

    #127195

    This is still not solved.

    #128523

    Can anyone fix this issue?

    #129007
    Zed
    Cryout Creations mastermind

    As I said previously, the theme does not control or handle URLs, so I don’t see how it could interfere with them (while the site works fine with a Twenty theme).

    On our own theme demo the pagination URL works fine with Mantra: https://demos.cryoutcreations.eu/wordpress/mantra/blog/page/2


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #129143

    Well now I see why you don’t agree. You are testing the blog part, and not the category part (which this thread is about).

    https://yoursite.com/blog/page/2/ – is working fine, for our site as well.
    https://yoursite.com/yourcategory/page/2/ – is not working, and I expect not for your demo either

    When I try https://demos.cryoutcreations.eu/wordpress/mantra/cat/post-types/page/2/ I get the same error as I get on our site.

    But you will have to add a few more posts to the category, because as of now – you could argue that the demo site does not contain enough posts in the category to even make it to a 2nd page.

    #129144

    Well now I get why you don’t agree. You are testing pagination on the blog part and not the category part, which this thread is about.

    https://yoursite.com/blog/page/2/ – is working fine, for our site as well
    https://yoursite.com/yourcategory/page/2/ – is not working, and I assume it is the same for your demo as well

    Visiting https://demos.cryoutcreations.eu/wordpress/mantra/cat/post-types/page/2/ gives the same error as we see on our site.

    But please, add a few more posts to your category on the demo page, so the argument of too few posts in the category can be dismissed as well. Our site can fill 18 pages on just one category…

    #129250

    Well now I get why you don’t agree. You are testing pagination on the blog part and not the category part, which this thread is about.

    URL (https://yoursite.com/blog/page/2/) – is working fine, for our site as well
    URL (https://yoursite.com/yourcategory/page/2/) – is not working, and I assume it is the same for your demo as well

    Visiting (https://demos.cryoutcreations.eu/wordpress/mantra/cat/post-types/page/2/) gives the same error as we see on our site.

    But please, add a few more posts to your category on the demo page, so the argument of too few posts in the category can be dismissed as well. Our site can fill 18 pages on just one category…

    #129367

    Well now I get why you don’t agree. You are testing pagination on the blog part, not the category part which this thread is about.

    URL ./blog/page/2/ – is working fine, for our site as well
    URL ./yourcategory/page/2/ – is not working, and I assume it is the same for your demo as well

    Visiting the demo and trying ./mantra/cat/post-types/page/2/ gives the same error as we see on our site.

    But please, add a few more posts to your category on the demo page, so the argument of too few posts in the category can be dismissed as well. Our site can fill 18 pages on just one category…

    • This reply was modified 2 years ago by l1512191.
    #129537
    Zed
    Cryout Creations mastermind

    I linked to the blog section because our Mantra demo setup does not have enough posts to activate the pagination on category sections. However, I tested this on one of our test sites and links there work as expected.

    As I told you before, pagination links are generated using core WordPress functionality and are not controlled by the theme – however, these are generated based on your WordPress permalink settings.

    I notice that your example URL:
    https://yoursite.com/yourcategory/page/2/
    is missing the category base in the permalink – by default category/
    making the correct URL be:
    https://yoursite.com/category/yourcategory/page/2/

    Unless you’ve set up a complex fine-tuned permalinks configuration, the base for categories/tags cannot be empty.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #130513

    And just like that, we have a solution (missing category base). Thanks Zed!

    Any idea on why pagination on category sections works fine without the category base on other themes? Ex: Twenty themes

    • This reply was modified 2 years ago by l1512191.
    #130583
    Zed
    Cryout Creations mastermind

    Does the category pagination work on that exact site with any other theme?


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #130626

    Yes, Twenty Twenty One.

    #130858
    Zed
    Cryout Creations mastermind

    Check if disabling the numbered pagination option works with your custom links.

    TwentyTwentyOne uses wp_link_pages() to generate the pagination links markup, while in Mantra we used get_pagenum_link() when generating the links.

    These two core functions might have different behaviour when presented with unexpected permalinks configuration.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #131160

    As the problem is solved for me, I’ll end my case here.

    The why part was just my curiosity, and I do not have time to dive deeper into the why part.

    Thanks Zed!

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

The topic ‘Mantra – Category Archive page 2+’ is closed to new replies.