Forums

Only show links when entering a category (3 posts)

  1. martinwa
    Member
    Posted 3 weeks ago #

    I am using WP 2.2.1 and want to customize the way all posts in the categories are shown.
    When pressing a category link I just want links to the posts to be shown.

    How is that done?

    Best regards
    Martin

  2. boober
    Member
    Posted 3 weeks ago #

    depending on your theme, you need to edit your archive.php or category.php file. look around in there for a snippet that says the_content or the_excerpt and delete it. it might look something like this
    <?php the_excerpt() ?>

  3. martinwa
    Member
    Posted 3 weeks ago #

    I am using Clean & mean (http://cavemonkey50.com/code/clean-and-mean/)
    It does not have a archive.php or category.php file.

    The file theloop.php seems to do it all.
    What part of the file should I edit?

    <?php if(!is_single()) { ?>
    		<?php if (is_category()) { ?><h1 class="title">Archive for the <?php echo single_cat_title(); ?> Category</h1>
    		<?php } elseif (is_day()) { ?><h1 class="title">Archive for <?php the_time('F jS, Y'); ?></h1>
    		<?php } elseif (is_month()) { ?><h1 class="title">Archive for <?php the_time('F Y'); ?></h1>
    		<?php } elseif (is_year()) { ?><h1 class="title">Archive for <?php the_time('Y'); ?></h1>
    		<?php } elseif (is_search()) { ?><h1 class="title">Search Results for "<?php echo wp_specialchars($s, 1); ?>"</h1>
    		<?php } elseif (function_exists('is_tag')) if(is_tag()) { ?><h1 class="title">Tag Archive for "<?php ob_start(); wp_title(''); $tag = ob_get_contents(); ob_end_clean(); echo trim($tag); ?>"</h1><?php } ?>
    	<?php } ?>
    
    	<?php while (have_posts()) { the_post(); ?>
    
    		<div id="post-<?php the_ID(); ?>" class="item <?php if ($first != 1) { echo "first"; $first = 1; } // Hack for the Titles ?>">
    			<div class="itemhead">
    				<h1><a href="<?php the_permalink() ?>" rel="bookmark" title='Permanent Link to "<?php the_title(); ?>"'><?php the_title(); ?></a></h1>
    				<div class="headerlist">
    				<span class="metadata date"><?php the_time("D, M j, Y"); ?> at <?php the_time("g:i a"); ?></span>
    				<span class="metadata cats">Posted in <?php the_category(', '); ?></span>
    				<span class="metadata"><?php comments_popup_link('0 Comments', '1 Comment', '% Comments', 'commentslink', ''); ?></span>
    				<span class="metadata"><?php edit_post_link('edit','',''); ?></span>
    				</div>
    			</div>
    			<div class="itemtext">
    				<?php the_content("Continue Reading \"". the_title("","",false) ."\" &raquo;"); ?>
    			</div>
    			<!--
    			<?php trackback_rdf(); ?>
    			-->
    		</div>
    
    	<?php } ?>
    
    	<?php if ((function_exists('print_pg_navigation')) && (!is_home())) { print_pg_navigation('<div class="navigation"><p>','</p></div>'); } else { ?>
    		<?php if ( is_home() || is_search() || is_archive() || is_tag() ) { ?>
    			<div class="navigation">
    				<div class="alignleft"><p class="home"><?php next_posts_link('&laquo; Previous Entries') ?></p></div>
    				<div class="alignright"><p class="home"><?php previous_posts_link('Next Entries &raquo;') ?></p></div>
    			</div>
    		<?php } ?>
    	<?php } ?>

Reply

You must log in to post.

About this Topic

Tags