WordPress.org

Support

Support » How-To and Troubleshooting » categories: how to only show title, not excerpt

categories: how to only show title, not excerpt

  • did a search and found no answer.

    under “categories” i only want to show the topic title, not a whole post/excerpt.

    how to change the code?

    that’s the code i have now:

    <?php wp_list_cats(‘sort_column=name’); ?>

    tks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • No, that code lists the category names in your sidebar.

    You need to learn about Template_Hierarchy.
    When you figured out wich template file is displaying your category archives… you will know which file you need to edit and you will delete the_excerpt template tag from it.

    tks moshu, appreciate, but here’s a wp-dummy.

    i got cats listed in archive.php and index.php – but which one to change how?

    here’s the archive.php:

    <div id=”contentleft”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1>” rel=”bookmark”><?php the_title(); ?></h1>
    <?php the_content(__(‘Read more’));?><div style=”clear:both;”></div>
    <div class=”postinfo”>
    <?php the_time(‘F j, Y’); ?> | Filed Under <?php the_category(‘, ‘) ?> | <?php comments_popup_link(‘Leave a Comment’, ‘1 Comment’, ‘% Comments’); ?> <?php edit_post_link(‘(Edit)’, ”, ”); ?>
    </div>

    and here the index.php:

    <div class=”postinfo”>
    <?php the_time(‘F j, Y’); ?> | Filed Under <?php the_category(‘, ‘) ?> <?php edit_post_link(‘(Edit)’, ”, ”); ?>
    </div>

    many thanks in advance!

    Go back and read that article again!

    Also, you should NOT look for anything like category… I told you EXACTLY what to look for!
    More reading: http://codex.wordpress.org/Stepping_Into_Template_Tags

    tks for the help moshu.

    a most interesting thing happened;

    found the code-to-be-deleted in archive.php:

    <?php the_content(__(‘Read more’));?><div style=”clear:both;”></div>

    when i delete the template tag, only the title’s permalink remained. what i wanted. but: the archive page got all messed up.

    if i delete the whole code line, all categories in the archive disappeared (with the exception of the default category).

    may it be that the “read more” plugin i am using is buggy?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘categories: how to only show title, not excerpt’ is closed to new replies.
Skip to toolbar