Twenty Twelve
[closed] Show only Post titles in category pages (8 posts)

  1. Vivek Nath.R
    Posted 2 years ago #

    In my category page full post are showing up. I want to make it only post titles.

    Anybody please help me to solve this.

    Vivek Nath.

  2. Michael
    Part-Time Forum Moderator
    Posted 2 years ago #

    if you have not already, strongly consider to create a child theme to work with;

    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:

     * 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>
    		</header><!-- .entry-header -->
  3. Vivek Nath.R
    Posted 2 years ago #

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

  4. Jose Castaneda
    Posted 2 years ago #

    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.

  5. felixsavvy
    Posted 2 years ago #

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

    Good bye
    Have a nice weekend.

  6. orion310591
    Posted 2 years ago #

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


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


    then make a copy of content.php, and save it as content-category.php;
    <?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.]

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    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.

  8. Andrew
    Forum moderator
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic