I want to remove the line break between the paragraph and the “Read more”. It should continue right after the three dots. Within the paragraph. Hope you understand what I mean.
Is it possible to place the link inside the excerpt? Can you fix it with css?
Thanks.
<?php
$args = array( 'numberposts' => 3 );
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post);
?>
<h2 class="news"><?php the_title(); ?></h2>
<?php the_excerpt(); ?> //this returns the paragraph with three dots
<a href="<?php the_permalink(); ?>">Read more</a> //this should somehow be inside the excerpt
<?php endforeach; ?>
No, but the fix is simple.
Add this line after your
foreach():Now it should stop printing
<p>tags.