Yes, finding the template being used for a particular page is a common problem. There are plugins that help you figure that part out. Though they may only tell you the main template. The part you need to edit could be in a sub-template.
Sub-templates are usually loaded by a call to get_template_part()
, though require
or include
statements could work. The template part function takes two arguments which are used together to compose the actual filename. I know you said you don’t know anything of PHP. If you at least have any sort of coding aptitude, you can figure this out. Define the WP_DEBUG
constant as true
in wp-config.php so you will be immediately notified of any PHP errors you introduce.
If the output is due to the main query, the code starting the output loop typically starts with something like
if ( have_posts()) {
while ( have_posts()) {
the_post();
You may see colons :
instead of curly braces {
demarcating a block of code. Alternative syntax serving the same purpose.
Secondary query loops can take the same form as the main query loop, but with class references, like $the_query->have_posts()
. Sometimes the loop is simply a foreach statement, for example
foreach ( $posts as $post ) {
My examples are for displaying posts, but your category page is outputting terms, not posts, so expect variations. In the term case, the template may not even be a theme template, but from a plugin. If so, one of the template identification plugins might have trouble identifying the right template. It often comes down to making educated guesses confirmed by adding trial output and checking if the output appears on the page in question. If you still have trouble with plugin templates, you might need to ask in the plugin’s dedicated support forum for assistance.
While it’s OK to temporarily alter templates to figure out the right file, you shouldn’t permanently alter the original template file. Whatever you change will be lost during the next update. To avoid this, you should create a child theme. You can copy over the applicable theme template to the child and edit as you see fit. For plugin templates, it’s not as easy. There still ought to be a way to override a plugin template, but alterations might also be possible by using filter hooks. If you see a apply_filters()
call related to the output you wish to change on a template, you can use a hook from your child theme’s functions.php file. While a more advanced concept, hooks are preferable to directly altering templates.
If you can identify the right template, I or someone else here should be able to help you work out the specifics that depend upon what the template code is actually doing.