• michaelcrook

    (@michaelcrook)


    I just updated the URLs for my categories, so I now have /content/blog. When that result loads, it says Category: Blog. Which file contains that so I can customize it? TIA!

    ETA: My particular theme does not have any theme files named category.

    ETA 2: I have a WordPress Hosting plan and as such, I do not have direct access to the theme’s folder and subfolders.

Viewing 3 replies - 1 through 3 (of 3 total)
  • bvbaked

    (@bvbaked)

    For a full explanation of files, you can refer to the WordPress template hierarchy

    I find this is a great resource to have on hand to explain what files are used or needed if you need to make customisations. If you don’t feel like read, there is an image as well.

    This particular case would fall under the Archive section. If you don’t have anything named category or category-blog then it is likely falling back to archive (most likely) or index.

    Whichever file it ends up being would handle all of them, since these would be the generic fallback case. You might find the_archive_title() if it is a classic theme or the archive title block is using a block theme which would need to be edited to change the title

    Thread Starter michaelcrook

    (@michaelcrook)

    What I’m finding is that when I click on domain.com/content/blog, it takes me to a list of the blog posts and right above that first post is:

    Category: Official Blog

    I just downloaded the theme to my laptop and it does not have category files either. But WordPress is getting that “Category: xxx” string from somewhere and I am having no luck.

    Moderator threadi

    (@threadi)

    What you see there is the so-called archive title. WordPress automatically adds this to the front of a taxonomy title.

    There are various ways to disable this, depending on the structure of your project. If you have a block theme, you can find this option in the archive title block and deactivate it. If you use an SEO plugin, you will probably find a setting for this there too. Many themes also offer an option for this.

    Unfortunately, as you haven’t told us anything about your project, we can’t tell you which method is right for you.

    Alternatively, it would also be possible to change the output via PHP hook. This can be done using this one: https://developer.ww.wp.xz.cn/reference/hooks/get_the_archive_title/ – an example: https://wordpress.stackexchange.com/questions/245274/how-to-remove-archive-label-from-archive-title

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Replace Catgoery’ is closed to new replies.