• Hi everyone.

    I’m asking for helping witn creating Customize permalinks.

    FIRST CASE: This works
    Custom structure
    /%category%/%postname%/
    The list of urls:
    [ redundant link deleted ]
    /blog/expert-articles/
    /expert-articles/how-internet-marketing-increases-business-sales/

    SECOND CASE: This doesn’t work
    Custom structure
    /blog/%category%/%postname%/
    The list of urls:
    /blog/
    /blog/expert-articles/
    /blog/expert-articles/expert-articles/how-internet-marketing-increases-business-sales/

    When I click on the article, then it opens /blog/expert-articles/expert-articles/how-internet-marketing-increases-business-sales/ but 404 page

    I need to make working the second case for correct site structure.
    Could I get some recommendations regarding how to make it working?

    • This topic was modified 1 day, 23 hours ago by blondboy.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    I noticed the URL you are getting has the category twice:

    /blog/expert-articles/expert-articles/how-internet-marketing-increases-business-sales/

    That usually means one of these things is happening:

    1. The post slug or custom permalink already includes expert-articles/
    2. A permalink/custom permalink plugin has saved a manual URL for the post
    3. The permalink rules need to be refreshed

    I would suggest checking the post edit screen first. Make sure the post slug is only:

    how-internet-marketing-increases-business-sales

    and not:

    expert-articles/how-internet-marketing-increases-business-sales

    Then go to:

    Settings > Permalinks

    and click Save Changes without changing anything. This refreshes the rewrite rules.

    Also check if you are using any permalink-related plugin. If yes, look for a custom permalink value on that post and remove the extra expert-articles/ part.

    I believe the correct structure should be:

    /blog/category-slug/post-slug/

    not:

    /blog/category-slug/category-slug/post-slug/
    Thread Starter blondboy

    (@blondboy)

    I had the mistake in the part of my first message about second case.
    I have not double category. It’s a misspell.

    I need to make working this url: /blog/expert-articles/how-internet-marketing-increases-business-sales/
    But if i add “blog” in custom permalink, then it doesn’t work.
    This custom permalink (/blog/%category%/%postname%/) breaks article’s link and it stops to open
    However, this link works “/blog/expert-articles/”. I can’t understand what the matter is

    Hello,

    Thank you for clarifying.

    It looks like the issue may be that WordPress is already using blog for the category archive URL.

    For example, this URL works:

    /blog/expert-articles/

    So WordPress may be treating that as the category archive and according to the output of that page on your site that seems to be the case.

    Then when you try this post URL:

    /blog/expert-articles/how-internet-marketing-increases-business-sales/

    WordPress may try to read it as another category level instead of a post, and that can cause the 404.

    I would suggest checking this first:

    Settings > Permalinks

    Then look at the optional field:

    Category base

    If it is set to:

    blog

    try removing it or changing it to something else, then click Save Changes.

    For example, you could use:

    /blog/%category%/%postname%/

    for posts, but avoid also using blog as the category base.

    So the conflict may not be the post slug now. It may be that both the category archive and the post permalink are trying to use the same /blog/category/ structure.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.