Plugin Directory

Get Image from Post

How do I display the results?

Insert the following code into your WordPress theme files:

General results

ithout passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.

getimagefrom_post();

Altering the before and after values

By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code:

getimagefrom_post('before=<p>&after=</p>');

Adding a Link

If you'd like to link to the post (remember it's not live yet) you can do so by calling:

getimagefrom_post('link=true');

Which image?

You can specify which image is returned using the code:

getimagefrom_post('image=2');

Strip Attributes

If you would like to strip the attributes such as width and height from the returned value:

getimagefrom_post('strip=true');

Echo vs. Return

Finally, if you'd like to copy the results into a variable you can return the results as follows:

getimagefrom_post('show=false');

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus

No data
0,1,0

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(5 ratings)