Support » Theme: Twenty Twelve » Show only Post titles in category pages

Viewing 7 replies - 1 through 7 (of 7 total)
  • if you have not already, strongly consider to create a child theme to work with;
    http://codex.wordpress.org/Child_Themes

    possibly edit category.php;
    change the one line to:

    get_template_part( 'content', 'category' );

    then make a copy of content.php, and save it as content-category.php;
    and remove all un-needed code; possibly just leave this code:

    <?php
    /**
     * The template for displaying category archive pages content.
     *
     * @subpackage Twenty_Twelve
     */
    ?>
    
    		<header id="post-<?php the_ID(); ?>" class="entry-header">
    			<h1 class="entry-title">
    				<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    			</h1>
    		</header><!-- .entry-header -->

    Thread Starter Vivek Nath.R

    (@viveknath322)

    Sorry alchymyth, I didn’t get what you are saying because I’ve very little knowledge about these codes.

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    What alchymyth is saying is to create a child theme. Once that is done copy the category.php file to your child theme’s folder and change the line that starts off as: <?php get_template_part( 'content', get_post_format() ) ; ?> to what he is suggesting and remove anything you don’t want to display. 🙂

    Hope that helps a little.

    @alchymyth: Thank you very much, perfect solution you have gave.

    Good bye
    &
    Have a nice weekend.

    I want to confirm this as working.
    To simplify it even more:

    1.

    category.php;
    find:
    <?php get_template_part( 'content', get_post_format() ) ; ?>
    replace with:
    get_template_part( 'content', 'category' );

    2.

    then make a copy of content.php, and save it as content-category.php;
    find:
    <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
    replace with:
    <?php // the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>

    WordPress should pay more attention to support board to find ways how to improve WP… this should be one of settings we could use…

    [Please post code & markup between backticks or use the code button. All of your posted code may now have been permanently damaged by the forum’s parser.]

    No! Do not edit the Twenty Twelve theme. It is the current default WordPress theme and having access to an original, unedited, copy of the theme is vital in many situations. First create a child theme for your changes.

    And next time (and as per the Forum Welcome), please post your own topic instead of a 7 month old one that references an older version of WordPress and the theme.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    WordPress should pay more attention to support board to find ways how to improve WP

    WordPress is blogging software. Feel free to develop software that crawls through unresolved threads and provides answers. That has nothing to do with WordPress (blogging software).

    WordPress.org has support forums to provide support for this blogging software. Human beings contribute to the forums out of their free time. They come and go. It is not our place to tell people what to do with their free time.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show only Post titles in category pages’ is closed to new replies.