WordPress discontinuity between Excerpt and its ‘more-button’

I’m building a custom WordPress theme.In my index.php page i’m looping to display the excerpts for all of my blog-posts.

this is how I break the post flow:

Read More
//At first I place <!--more--> in my post-text where I want to break it..

the_content('more');

Now the point is I’d like to place the ‘more’ button not right after the excerpt.I’d like to place this button in another div containing other link-buttons (tags,comments-count ecc).

enter image description here

The only thing I came up with is using a span around the ‘more’ button (with absolute positioning).

Is there any better solution?

thanks

Luca

Related posts

Leave a Reply

1 comment

  1. The fact that WP injects the read more link into excerpts, rather than just giving the formatted excerpt, has always been a problem for me, too. Especially since what surrounds the link is dependent on where the author placed it: inline or on a new line, before or after an image, inside or outside inline markup. Here’s what I’ve done in the past — I’m not sure whether this is the best solution but it should work…

    • get the raw, unformatted post content: $content = $post->post_content
    • get the excerpt by using explode("<!--more-->", $content).
    • run the excerpt through the the_content filter: $excerpt = apply_filters("the_content", $content[0]);
    • Balance the tags… $excerpt = force_balance_tags($excerpt)

    On the whole, a better solution may be to ask authors to provide a text excerpt to go with each post rather than relying on this kloodgy method.