Viewing 4 replies - 1 through 4 (of 4 total)
  • What you’re reporting is not the default WordPress behaviour. And you seem to be mixing up two things here: post permalink vs category permalink.

    Permalink Custom Structure: /category/%category%/%postname%/
    https://example.com/category/category-name/
    https://example.com/category/category-name/page/2/

    That’s not default WordPress behaviour, unless you’re doing something else elsewhere.

    With the custom permalink structure: /category/%category%/%postname%/

    Post permalink should become example.com/category/category-name/post-name/

    While category permalink becomes: example.com/category/category/category-name/

    Note the double category in the category permalink. This is because WordPress automatically adds the category base to category permalinks, so there’s no reason to include this again in your permalink structure.

    But when I use prefix ‘.’ and Permalink Custom Structure: /%category%/%postname%/
    this works:
    https://example.com/category-name/
    but this returns 404
    https://example.com/category-name/page/2/

    Again, the custom permalink structure /%category%/%postname%/ should NOT, by default, produce these URLs you’re reporting. Instead, you should get:

    Post permalink: example.com/category-name/post-name/

    Category permalink: example.com/category/category-name/

    … and these should not return a 404 error on paginated pages.

    If you’re indeed getting the URLs you’re reporting, then something else may be going on.

    My guess: you (or a plugin you’re using) may be removing the category base that WordPress automatically adds to category permalinks. This is a common cause of 404 on various archival-type listings.

    If you can give your actual domain name, I could dig deeper into this for you.

    Thread Starter Mitko

    (@apendix)

    Here are me settings:
    https://prnt.sc/bl06LOHBcKAO
    I followed these instructions:
    https://boomdevs.com/easy-ways-to-remove-category-from-wordpress-url/#method-1-remove-categories-from-through-wordpress-settings

    here is the result:
    https://oryahovo.com/statii/
    https://oryahovo.com/statii/page/2/

    • This reply was modified 7 months, 3 weeks ago by Mitko.
    • This reply was modified 7 months, 3 weeks ago by Mitko.
    • This reply was modified 7 months, 3 weeks ago by Mitko.
    • This reply was modified 7 months, 3 weeks ago by Mitko.
    Thread Starter Mitko

    (@apendix)

    I resolved the problem by using Yoast SEO:

    https://prnt.sc/KIBakQpIiiNZ

    Glad you got it sorted. The real problem was the . “hack” from that blog post you used to remove the category base.

    I was just about to post a new response suggesting you use your SEO plugin for this rather than the . “hack” the blog post suggests… but you figured this out on your own.

    If you have a second to spare, kindly mark your post as RESOLVED.

    Good luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pagination Issue for Category Pages Without Base Prefix Leads to 404 Error’ is closed to new replies.