WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Vivek Nath.R
    Member
    Posted 1 year ago #

    In my category page full post are showing up. I want to make it only post titles.
    http://www.digitaladvices.com/category/internet/

    Anybody please help me to solve this.

    Regards.
    Vivek Nath.

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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 -->
  3. Vivek Nath.R
    Member
    Posted 1 year ago #

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

  4. Jose Castaneda
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

    Good bye
    &
    Have a nice weekend.

  6. orion310591
    Member
    Posted 11 months ago #

    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.]

  7. esmi
    Forum Moderator
    Posted 11 months 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 11 months 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