• Resolved savagemania

    (@savagemania)


    Is there a way to make the page loaded after clicking the link made by the catagorie/archive widget to have previews or links to posts rather than showing the entire post. I have some huge posts and they are pushing the others so far down you would never see them.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You could make use of the template tag, the_excerpt.

    In the WordPress Default 1.6 Theme, when you click on a Category or Archive link (e.g. from the links presented by the widgets you mentioned) the archive.php template file is used to display those posts. So, in archive.php you would change the code to use the_excerpt intead of the_content.

    See also:
    Template Hierarchy
    Stepping into Templates
    Stepping into Template Tags

    Thread Starter savagemania

    (@savagemania)

    It doesn’t seem to change anything?

    What theme are you using?

    Name of the file did you make the changes?

    Thread Starter savagemania

    (@savagemania)

    I am using the theme Nebula. I edited the file /wp-content/themes/default/archive.php Here is a link to the problematic site if you need more info https://www.motormayhem.net click the june 2007 archives and you will see.

    I made the line

    <?php while (have_posts()) : the_post(); ?>
    		<div class="post">
    				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    				<small><?php the_time('l, F jS, Y') ?></small>
    
    				<div class="entry">
    					<?php the_content() ?>
    				</div>
    
    				<p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    
    			</div>
    
    to

    <?php while (have_posts()) : the_post(); ?>
    <div class=”post”>
    <h3 id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h3>
    <small><?php the_time(‘l, F jS, Y’) ?></small>

    <div class=”entry”>
    <?php the_excerpt() ?>
    </div>

    <p class=”postmetadata”>Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></p>

    </div>

    Does this make sense to you?
    1. I am using the theme Nebula.
    2. I edited the file /wp-content/themes/default/archive.php

    Wouldn’t be logical to edit the files of the theme you are using???

    Thread Starter savagemania

    (@savagemania)

    There seems to be not archive.php file in the nebula template folder.

    Make one.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Catagorie Listing’ is closed to new replies.