• hello,

    when I go to a category page, it dives right into all the posts. it starts with the most recent post (incuding all the text from it) and then the next recent one, etc…

    I would like to display an “index” of the posts, instead of the entire posts. so if someone clicks on a category from the sidebar, they get a listing of the titles of the posts in that category instead of all the text for each one. Then they can select the one they want to read, to get the text.

    I know there must be a way to do this. Can someone help me out?

    thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Make a child theme if not already yet
    https://codex.www.ads-software.com/Child_Themes

    and overwrite category.php template replacing this line

    get_template_part( 'content', get_post_format() );

    with something like this

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<h1 class="entry-title">
    			<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    		</h1>
    	</header>
    	<footer class="entry-meta">
    		<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    	</footer><!-- .entry-meta -->
    </article><!-- #post -->

    It could be simpler, adjust it as needed, the important thing is the_title().

    There is other way which is displaying none via CSS the elements that you don’t want (the text content) on the category page, this way you don’t need to touch template file.

    Thread Starter garybeck

    (@garybeck)

    thanks but that didn’t work for me. when I comment out (or delete) that line

    and replace it with your code, the entire page disappears.

    any other ideas?

    is it possible to display an excerpt of each post on the category page, rather than the whole post?

    either just the title, or a short excerpt would be great.

    thanks

    am interested to see a working reply to this as i too am looking for a solution for this. Garybeck, please let me know if you find a solution.

    @swanagesite
    please start your own topic; https://www.ads-software.com/support/theme/twentytwelve#postform

    @garybeck

    that didn’t work for me

    what is the full exact code you are using for category.php in your child theme?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to display an index of posts in a category?’ is closed to new replies.