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.
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.
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.