Wordpress category pages named incorrectly


I’m trying to use Blocs for a Wordpress theme. I’m having problems with category pages.

Per the Wordpress documentation there is a hierarchy to how templates are chosen.

  1. Look for category slug template (i.e., category-SLUG.php)
  2. Look for category ID page (i.e., category-ID.php)
  3. Look for default category page
  4. look for archive page.

The problem I’m running into is that I need to have a category page for a specific category and Blocs keeps renaming the page.

I create a page in Blocs called category and everything works OK. I get category.php when I export.

I create a page called category-help and when I export I get page-category-help.php.

This is a problem. Is it a bug or something I’m not understanding?

It’s a shortcoming of the current way Blocs works, Im hoping to drop Blocs 4.5 later this week.

What do you need the category page names to look like, I may be able to add something that projects the name.

I guess the easiest thing is to not be opinionated about names and just use whatever is entered within the editor.

The other option would be to let you classify the page as a “tag, category, post or page” and then prepend the class to the filename (i.e., category-NAME, page-NAME, etc)

1 Like

Currently Blocs exports anything that is not a specific template type(name) as a custom page template.

This is basically to help users not well versed in WP template development get up and running without needed to know how page template files should be named.

I can loosen this up a touch and check for custom categories and archive pages based on the naming.

This should be ready to try out in a few days.

1 Like

This has now been added to Blocs V4.5 (beta coming in a few days)

Page names that contain the prefixes [ tag-, page-, single-, archive-, category- ] are now protected and will not be altered by Blocs.

1 Like