0
What’s wrong? I did the function to excerpt in wordpress posts and import to another site, however it is not cutting with what I set.
Someone can give a light?
<?php while (have_posts()): the_post(); ?>
                    <div class="moldG">
                        <div class="thumbsG">
                            <?php the_post_thumbnail( array(300,266) ); ?>
                        </div>
                    </div>
                    <div class="wptexto">
                            <a class="blog" href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a>
                            <?php the_excerpt(); 
                             if ( is_category() || is_archive() ) {
                                    the_excerpt();
                                    } 
                           function new_excerpt_length($length) {
                               return 240;
                               }
            endwhile; ?>
                    </div>  
                </div>
						
It’s not about your question, but you’re calling the_excerpt twice on the category and file page.
– Ricardo BRGWeb