I want to remove the “Continue Reading” link from the teaser excerpt only and not from the automatic excerpt, which filter is easily available.
This is the original code; it’s from the Showcase Template Page Template:
<?php while ( have_posts() ) : the_post(); ?>
<?php
if ( '' != get_the_content() )
get_template_part( 'content', 'intro' );
?>
<?php endwhile; ?>
Here is the Intro:
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mytheme' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit', 'mytheme' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->
–>
Change standard text for all excerpts:
Create your own excerpt function:
Use
<?php rm_excerpt(); ?>
when you want display custom excerpt. First value set words limit and second value set separator. Example:<?php rm_excerpt(10,' (...)'); ?>
. To create separate link “read more”, insert<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read More?</a>
Add this to your functions file and it will remove the more link.
http://codex.wordpress.org/Customizing_the_Read_More
It sounds like you want to remove the “Continue Reading” teaser from the_content(). If so, this example from the Codex would be what you need:
UPDATE
Based on your code, it looks like you have added the code in the wrong place. Without seeing your files, you probably need to go to content.php and look for the_content() and make the change there. I checked it on one of my themes that uses templates and it works fine. You should also read up more on templates, so you understand how they function. In short:
1 – Remove this text from your code: if ( ” != get_the_content(”,TRUE,”) )
2 – Go to content.php in your theme and find the_content() and change it to
the_content('',TRUE,'')
3 – Add
<!--noteaser-->
as indicated aboveThis is if you are using
<!--more-->
to manually setup the excerpts.Just edit this part like this:
get_the_content("")
With this
""
you will make content empty. So just you would have your content text without read more link 🙂I had to go into the wp-includes folder, inside the formatting.php file and edit line 3284 and change the default number of words to include in the excerpt to a huge number like so:
The default is only 55