WordPress before post without the link "read more"

0

Hello,

I'm a beginner on the Wordpress platform, and I find myself in a situation where I do not want the "Continue reading" link to appear in the previews of my posts.

To add the previews of the posts in home, I used the following code:

<article class="article-noticia-home">
<?php
if ( has_post_thumbnail() ) { ?>
    <div class="noticias-home-image-container">
        <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>">
            <img src="<?php echo wp_get_attachment_url(get_post_thumbnail_id()); ?>" />
        </a>
    </div>
<?php } ?>
<header>
    <h3 class="recent-blog-entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h3>
</header>
<?php the_excerpt(); ?>

Until then, but where I put " <?php the_excerpt(); ?> " it brings a part of my post and a Read more link.

<article class="article-noticia-home">
<div class="noticias-home-image-container">
    <a href="http://cristalink.com.br/site/2016/05/04/titulo-noticia-04/" title="Título Notícia 04">
        <img src="http://cristalink.com.br/site/wp-content/uploads/2016/05/noticia04.jpg"></a></div><header><h3class="recent-blog-entry-title"><a href="http://cristalink.com.br/site/2016/05/04/titulo-noticia-04/" title="Título Notícia 04">Título Notícia 04</a></h3>
</header>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vestibulum justo ut quam posuere,
ullamcorper ultrices est sagittis. Morbi rhoncus, erat nec convallis pharetra, tellus urna pharetra tellus,
ut lacinia arcu enim vitae enim. Aenean faucibus, erat vel posuere commodo, purus purus dignissim nibh, 
in laoreet lectus Lorem ipsum dolor sit amet, consectetur adipiscing elit. … 
    <a href="http://cristalink.com.br/site/2016/05/04/titulo-noticia-04/" class="more-link">
        Continue lendo 
        <span class="screen-reader-text">Título Notícia 04</span> 
        <span class="meta-nav">→</span>
    </a>
</p>

How do I proceed with the post preview only, and without the link?

Thank you.

    
asked by anonymous 04.05.2016 / 16:32

1 answer

1

Add this piece of code to your functions.php :

add_filter( 'the_content_more_link', 'bacon_more' );
    function bacon_more() {
        return '';
    }

It adds a filter to return nothing in place of read more

    
04.05.2016 / 21:40