• Resolved bgurgur

    (@bgurgur)


    Hello,

    I would like to remove sub categories from canonical, basically instead of the following URL structure:
    https://ramazandemir.org/yazilar/diger/olcu-birimleri-ve-takvim/
    to this:
    https://ramazandemir.org/yazilar/olcu-birimleri-ve-takvim/

    diger is a sub category under yazilar so the generated canonical and URL structure is with the parent and child. Is it possible that I exclude the sub category as for my usage I want the focus for SEO to be more for my article’s keywords than the sub category it belongs to.

    My permalinks setting in wordpress is: /%category%/%postname%/

    Kindly looking forward for your guidance. If you say “You’re wrong about this whole thing and you should make your sub categories more meaningful to have better SEO instead of removing it” I would also appreciate.

    Thanks

    • This topic was modified 6 months, 2 weeks ago by bgurgur.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    When selecting multiple categories for a post, you can assign a primary category. In the Block Editor, the dropdown field will appear under the Categories checkboxes when more than one category is selected.

    If you assign “yalizar” as the primary category, then “diger” will be removed from the canonical URL. WordPress will also honor this setting in the admin area after a page refresh.

    The lowest primary category selected will include all its parents in the URL. So, if you select “diger” as the primary category, then its parent category, “yalizar,” will also be part of the canonical URL. The children of the lowest primary category will be ignored for the URL.

    I hope this makes sense ?? Cheers!

    Thread Starter bgurgur

    (@bgurgur)

    What! thanks for your response and the little lecture about wordpress ^^ I did not know that! It works perfectly.

    Based on how TSF works, would it be better in terms of SEO to remove the child category from the URL? Since the focus is more about the titles of my articles. Yazilar basically means Articles in English so the hierarchy would make sense without the child category.

    One thing to note though, on the article page itself I’m showing both parent and child categories in the breadcrumb for easier navigation but not sure if canonical should match with that or I’m better with just the parent category in the URL.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi again!

    The primary term (category) selection is actually a feature we added to WordPress ??

    I recommend making a site hierarchy that is most logical for visitors to navigate your site. This is where search engines are being calibrated toward.

    The breadcrumbs should consider the primary term path as per the description in my previous reply. So, if the primary term is a child of another term, then both terms are added to the breadcrumbs (and canonical URL). If it doesn’t work as expected, please let me know.

    You can inspect the canonical URL by inspecting your page’s source. The canonical URL should look like this:

    <link rel="canonical" href="https://example.com/docs/" />
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove sub category from generated canonical’ is closed to new replies.