Background
- https://rajuginni.com/ is the domain
- I have a WP page called “wordpress” with content
- I have a WordPress category called “wordpress“
- I have a WP post entitled “Make WordPress use the page instead of category”, and the category is set to “wordpess”
Expectations
- When I go to https://rajuginni.com/
wordpress
, I want to see the page about foobars, not a WP category page that shows all blog posts with that category. - When I go to the blog post about fun things, the URL is https://rajuginni.com/wordpress/redirect-category-page/
Some wordpress theme Preffering page some themes priotizing cateogory
Genese frame work,
Studio pro: preferring cateogory
Magazine Pro: prefering page sometimes but also
Rank Math SEO → General Settings → Links and enable the Strip Category Base option.
Alternate option Used page builder to otpimize the wordpress cateogry page
2nd option: 301 redirect catgeory to page, category should be with base keyword wp.com/car/test to wp.com/test (page)
The dots in cateogry base setup not working in 2025
i placed 2 dot .. its wokred temporary.
Setup
Here’s my setup (it does not require any additional plugins or code edits) A couple of installed plugins are WP Rocket and Yoast on which I’ll focus in this thread.
- WP Dashboard->Settings->Permalinks
- Select “Custom Structure” and enter
/%category%/%postname%/
in the field - On the same page, change “Category base” to a single dot. “.” (no quotes, just a single dot/period/full stop
I have Yoast installed, which I had set up to override the permalink settings, but I believe this messed up my task at hand.
- WP Dashboard->SEO->Advanced->Permalinks(tab)
- “Change URLs->Strip the category base…” =
Keep
- Then you need to clear the cache. I use WP Rocket for caching, so I flushed the cache and everything now works the way it should.
How the WordPress Template Hierarchy Works in Child Themes
- single-{post-type}-{slug}.php within the child theme
- single-{post-type}-{slug}.php within the parent theme
- single-{post-type}.php within the child theme
- single-{post-type}.php within the parent theme
- single.php within the child theme
- single.php within the parent theme
- singular.php within the child theme
- singular.php within the parent theme
- index.php within the child theme
- index.php within the parent theme
WordPress Template Hierarchy: Understanding Its Structure and How It Works
cateogory tags pages
- category-{slug}.php
- category-{id}.php
- category.php
- archive.php
- index.php
- archive-{post_type}.php
- archive.php
- index.php