get_the_content WITH formatting
-
I’ve been trying to highlight the first post and one of the things I needed to do was to get the layout in a specific manner which was to have an image from the post extracted and inserted before the headline. That wasn’t much of a problem with a little
preg_match
.However the next issue is where I’m stumped right now. Since I already have an image representing the post, i need to get the rest of the post WITH formatting, without images and stopped before the
<!--more-->
tag. The only way I know that I get a formatted text is viathe_content()
. But since I can’t processthe_content()
and$post->post_content
andget_the_content()
are not giving me formatted text, I’m kinda stuck as to how to proceed further.I can do a
preg_replace
orstrip_tags
to replace images if i can get a formatted string terminated before<!--more-->
. But I need that formatted string.Thanks in advance…
- The topic ‘get_the_content WITH formatting’ is closed to new replies.