WordPress.org

Ready to get started?Download WordPress

Forums

Excerpt field doesn't create excerpt (5 posts)

  1. SPECTRASF
    Member
    Posted 2 years ago #

    I'm a using a free Rbox theme and I cannot create an excerpt for any post in any category. When I create a post and put it in a category, the category shows the whole post even though there is a read more link. When I click the read more link, it takes me to the post and shows me the same thing. How can I fix it to show excerpts in all my categories' posts?

  2. the theme uses the_content() in the archives and index pages (in loop.php); with a hardcoded 'read-more' which always shows, independent of the use of the 'more tag'.

    however, I would expect that the output of each post in the category archive should stop at the 'more tag' position.

    using the excerpt field will have no effect on the output.

    if you want the excerpt in the category arcive (and possibly in any archive) you need to edit loop.php;

    find:

    <?php if ( is_archive() || is_search() ) :  ?>
    
    			<?php the_content( __( '', 'Rbox' ) ); ?>
    			<div class="clear"></div>
    			<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'Rbox' ), 'after' => '' ) ); ?>
    
    	<?php else : ?>

    change it to:

    <?php if ( is_archive() || is_search() ) :  ?>
    
    			<?php the_excerpt(); ?>
    			<div class="clear"></div>
    			<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'Rbox' ), 'after' => '' ) ); ?>
    
    	<?php else : ?>

    http://codex.wordpress.org/Function_Reference/the_excerpt

  3. SPECTRASF
    Member
    Posted 2 years ago #

    Thank you, couldn't even get the creator of the theme to help me.

  4. SPECTRASF
    Member
    Posted 2 years ago #

    Now, I have a automatic excerpt that WP makes for me, how can I get the custom excerpt that I have posted to show in my categorized post?

  5. SPECTRASF
    Member
    Posted 2 years ago #

    Oh nevermind, fixed it myself.

Topic Closed

This topic has been closed to new replies.

About this Topic