Wordpress help

Discussion in 'PHP' started by anarmyofme, Apr 21, 2008.

  1. #1
    While posting in WP, I will usually use the "More" tag to break up each post. If you access the posts from the main page, the "More (Read the rest of this entry)" tag will appear. However, when viewing category pages, the "More" tag disappears, with the posts incomplete. I assume I'm missing a piece of code somewhere in the template. Any suggestions?
     
    anarmyofme, Apr 21, 2008 IP
  2. Hades

    Hades Well-Known Member

    Messages:
    1,873
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    150
    #2
    I'm pretty sure your archive.php file uses the call for the exceprt (<?php the_excerpt();?>) in order to avoid duplicate content. So if you change the_excerpt to the_content it should show up the read more text.

    Regards,
    Nick

    P.S. if you have a categories.php file, then it would be that file and not archive.php
     
    Hades, Apr 21, 2008 IP
    anarmyofme likes this.
  3. anarmyofme

    anarmyofme Well-Known Member

    Messages:
    1,136
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    130
    #3
    One more thing (for anyone out there). I just upgraded to WP 2.5 for my wife's site and now my posts have disappeared from the main page. They still exist elsewhere but don't show on the main page:

    mommymotivator.com

    <?php get_header(); ?>
    <div id="wrapper">
    	<div id="content">
    	<?php if (have_posts()) : ?>
    
    
    
    		<?php while (have_posts()) : the_post(); ?>
    				
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<div class="post-date">
    					<div class="post-day"><?php the_time('d') ?></div>
    					<div class="post-month"><?php the_time('M') ?></div>
    				</div>
    				<div class="post-title">
    					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    					<div><?php the_category(', ') ?></div>
    				</div>
    				
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    		
    				<p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    			</div>
    	
    		<?php endwhile; ?>
    
    
    PHP:
     
    anarmyofme, Apr 21, 2008 IP