I am creating a custom Wordpress theme.During my index.php page i am looping to show the excerpts its my blog-posts.

this is the way I break the publish flow:

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


Now the thing is Let me put the 'more' button not immediately after the excerpt.Let me place this button in another div that contains other link-buttons (tags,comments-count ecc).

enter image description here

The only real factor I emerged with is applying a span round the 'more' button (with absolute positioning).

Can there be any better solution?



The truth that Wordpress inserts the find out more link into excerpts, as opposed to just giving the formatted excerpt, happens to be an issue for me personally, too. Especially since what surrounds the hyperlink relies upon in which the author placed it: inline or on the new line, before or after a picture, inside or outdoors inline markup. This is what I have done previously -- I am unsure whether this is actually the best answer however it should work...

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

Overall, a much better solution might be to request authors use a text excerpt to choose each publish instead of depending about this kloodgy method.