View Single Post
Old 05-07-2012, 11:50 AM  
Coyote
Drinker of Scotch
 
Industry Role:
Join Date: May 2003
Location: Texas
Posts: 242
You don't need to execute php within a post to accomplish what you want. The easiest method is to create a short-code handler. Read about it here.

You would write your normal post, and embed the short-code where ever you want an image to appear, then continue writing your post content.

The short-code handler is 'similar' to a callback function and gets executed each time that post is displayed. For your intent, the short-code handler will test whether the post is displayed on the home page, and if true, will display the desired image. If it is false, it will simply remove the short-code you entered and return only the post content, without the image.
__________________
Ethernet Servers

Quote:
CS: Linux can pretty much run on a potato. Which is a GOOD thing.
Coyote is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote