• Resolved xan3ver

    (@xan3ver)


    Good day

    Link to my website: http://hooplahappiness.com

    I have a few categories that is in my navigation menu (ie. travel, diy, food and photography). When you click on one of these menu titles the category shows up with heading (eg): ‘Category Archives: Travel’

    I have tried a gazillion stuff to change this template (including creating category-slug.php and content-slug.php files, but it remains the same. Which file should I be using for a template?

    I ideally want these pages to show the post title, feature image and an excerpt with no heading like ‘Category Archives: Category’.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    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.

    Thread Starter xan3ver

    (@xan3ver)

    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; ?>
    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Is the child theme the active theme?

    Thread Starter xan3ver

    (@xan3ver)

    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.

    Thread Starter xan3ver

    (@xan3ver)

    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' );
    }
    ?>
    Thread Starter xan3ver

    (@xan3ver)

    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!

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Great to see you got it sorted out!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Category Templates’ is closed to new replies.