I’m trying to customize a wordpress home page, exactly, the_content() function.
the website I’m trying to use is http://sportsponsorizzazioni.com/
If in the file about “loop” I use the function “the_content()” it gives me a list of full articles on the home page, with the image I’ve included in the post body and the text formatted as I want.
Using the function “the_excerpt()” in an other way, show me only the excerpt text, like 5 rows, without any image.
I just want to display on my home page, the first part of an article, with “read more” button after, and the image, but then I do a substring operation on the_content(”), it only gives me first X characters but without image… even if in my post the tag is on the start of the post.
I need something automatic, can’t add a “thumbnail image” or a “featured image” on every single post, is there a way to modify “the_content(”)” to let me take for example only the first 30 words of my post with the image?
Or (better) is there a way to include in “the_excerpt()” the image coded in my article?
Thanks a lot!
This plugin does exactly what you’re trying to do. See item number 4 in the FAQ section for pulling images from post content.