I'm working in a blog with a template of my own. When I link to a category page (i.e. mydomain.com/category/mycategory
) Wordpress generates this HTML code just after the header.php
:
<!-- HTML rendered by header.php -->
<!-- This 2 lines belong to index.php -->
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<!-- HTML rendered by content.php -->
<header class="page-header">
<h1 class="page-title">Category: My Category</h1>
</header>
<!-- .page-header --> <!-- this comment is also generated by content.php -->
<div id="post-292" class="grid-item">
<!-- The rest of content.php -->
</div>
My content.php
file is as follows:
<?php
/**
* The template part for displaying content
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?>
<div id="post-<?php the_ID(); ?>" class="grid-item">
...
So the question is: where is the <header>
tag generated and how can I customize it? I want to change the <h1>
rendered content Category: My Category to be just My Category, for example.
Any help or guide is appreciated. Thanks in advance for your answers.
header.php
and possibly yourindex.php
content.php
is never mentioned. I added acategory.php
file in the same directory asindex.php
and now is reading that file. Could you post your comment as an answer? That's exactly what I needed and you gave me an excellent reference bibliography. Thank you so much.