here is what I want to do:
I have a blog post which I want to display only to a specific point. So in the post I put
<!--more-->
on the right position.
My content.php looks like this:
<div class="entry-content">
<?php the_content('read more'); ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php mytheme_entry_footer(); ?>
</footer><!-- .entry-footer -->
The “read more” link gets displayed right after the content where it should be. But how can I display it inside the entry footer with the “Comment” link?
Is there a solution with the excerpt?
<?php the_excerpt(); ?>
I think this would even be better because I wouldnt need to put the line in every post.
You can remove the ‘read more’ by using the following filter in your
functions.php
:Now you can create your own read more link inside entry-footer:
Edit:
In comments below the following question was asked:
You can do this by checking if the excerpt is different from the content. If this is the case (so there is more content than the excerpt is showing) you can show the read more link:
I use one workaround:
Explanation: for front page I have a short overview only clickable in the post title. And for blog list (after
else
in the abovefunction.php
):In which you can notice missing
div
closing andfooter
opening tags. It is a bit messi, but it brings the original WordPress Teaser into next division.Thankyou for reading.