WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] edit archive.php to show list (3 posts)

  1. gimmeblog
    Member
    Posted 5 years ago #

    Anyone who knows how to edit the archive.php to show parts of a post. Like title + a few words?

  2. ronchicago
    Member
    Posted 5 years ago #

    here is code for showing title, the date, the author, comments, a few words (excerpt) and tags. you will need to look up the names of your "div class" tags or create new ones in your style.css ...

    <div class="">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p class="small"><?php the_time('F jS, Y') ?> by <?php the_author() ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
    
    <div class="">
    				<?php the_excerpt() ?>
    			</div>
    			<p class="tagged"><strong>Tags:</strong> <?php the_category(' &middot; ') ?></p>
  3. gimmeblog
    Member
    Posted 5 years ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic