Categories Not Showing Up in PAGES URLS!

Error Message

No Error Message is detected!

Other Information

My Issue:

I tried as I can to check everything (themes, plugins, updates…) without successfully resolving my issue.

I’m using the free hosting that InfinityFree provide.

I did an additional action to be extremelly sure:

  1. I created a new infinityfree hosting (this one) using a free subdomain provided by infintyfree.
  2. I installed WordPress.
  3. I changed Permalinks to custom permalinks: /%category%/%postname%/
  4. I installed WpCode Lite plugin.
  5. I inserted a php code snippet to add categories to pages.
  6. I updated page sample category.
  7. I viewed the page: The category is not showing up in the PAGE URL.
  8. The category is showing up in POST URL.

I tried with both updating wordpress and not updating it after installation.

I tried with the 3 default wordpress themes (updated & not updated).

I tried with another plugin to add categories to pages URLs.

I don’t really now what may cause me this issue.
Categories are showing up normally on POSTS URLS but not on PAGES URLS!!

In my last checking I didn’t install any other plugins, just one plugin at a time to add categories to pages!

Page sample link: http://potentprestige.great-site.net/sample-page/

Post sample link: http://potentprestige.great-site.net/logo-design/sample-post/

Please if you have any additional checks to perform let me know.

Thank you so much for your help and support.

Please read

2 Likes

Unfortunately it doesn’t provide a solution for my issue!

This is because, unlike Posts, Pages have even more persistent permalinks than Posts do — Pages URLs are not meant to have taxonomies in their URLs.

3 Likes

But urls without categories are good for niche sites, I need to create a siloed site, pages are more likely to rank high on google search than posts, so what can I do in this case?

Maybe you could search for a WordPress expert to help you with this?

Please keep in mind that is the InfinityFree forum, not the WordPress forum. I have some experience with WordPress because of how popular it is, but I can’t tell you how to change URLs.

If you do want to ask for more help, then I would like to urge you to be specific. So don’t talk about “a php code snippet” and “another plugin”, but share what code you used, what plugins you’ve used and how you used them. Nobody can tell you why a plugin or a code snippet doesn’t work if you don’t tell what you did.

3 Likes

Please bear in mind that the reason why pages have such behavior is that they have cleaner URLs than posts do. If you wanted the category to show up in the URL, I suggest that you just keep using posts.

In order to include categories (or other taxonomies) in the page URL, one have to go into the WordPress core much, much deeper, and I’m currently not aware of any pre-built plugins for this use case.

Additionally, the Theme Unit Test Data suggests that themes should never display taxonomies on the page template, which is a good sign that pages shouldn’t even have categories to start with.

4 Likes

Thank you so much for the insightful reply.

I apologize for not providing enough details in my previous post. I understand that the forum is primarily for hosting-related issues, and I appreciate your time and effort in responding.

Thank you for your understanding.
Omar

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.