The file would be category.php
:
https://themes.trac.wordpress.org/browser/twentytwelve/1.7/category.php
Do keep in mind you will want to create a child theme with your own version so you don’t lose any changes if/when the theme gets updated.
Hmmm…. I am working in a child theme. I changed the code, but the title still appears on each category page. Any suggestions?
<?php if ( have_posts() ) : ?>
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
/* Include the post format-specific template for the content. If you want to
* this in a child theme then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
endwhile;
twentytwelve_content_nav( 'nav-below' );
?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
Is the child theme the active theme?
Yes, it is!(Except if I did it wrong!) Here is my stylesheet entry:
/*
Theme Name: Twenty Twelve child
Theme URI: https://wordpress.org/themes/twentytwelve/
Author: the WordPress team
Author URI: https://wordpress.org/
Template: twentytwelve
Version: 1.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, gray, white, one-column, two-columns, right-sidebar, fluid-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
Text Domain: twentytwelve
*/
And in the wordpress panel it is my chosen theme.
I also have this code in my functions.php file
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/rtl.css' );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/editor-style.css' );
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/editor-style-rtl.css' );
}
?>
I am goingto mark this topic as resolved as it turns out my child themes was set up wrong. For anyone that is interested, here is the link to the forum topic:
https://wordpress.org/support/topic/child-theme-problems-11?replies=36
It seems these issues I were having is now fixed as well! Importance of the correct set up of a child theme!
Great to see you got it sorted out!