Allows users to fetch an image from a post within the Loop.
|Author:||Hors Hipsrectors (profile at wordpress.org)|
|WordPress version required:||4.0.0|
|WordPress version tested:||4.8.0|
|Added to WordPress repository:||07-06-2009|
|Total downloads:||5 394|
Click to start download
To install the plugin, please upload the folder to your plugins folder and active the plugin.
How do I display the results?
Insert the following code into your WordPress theme files:
Without passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.
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:
Adding a Link
If you’d like to link to the post (remember it’s not live yet) you can do so by calling:
You can specify which image is returned using the code:
If you would like to strip the attributes such as width and height from the returned value:
Echo vs. Return
Finally, if you’d like to copy the results into a variable you can return the results as follows:
- renamed function to be more compatible.
- tested and optimized in WordPress 3.2
- added test to determine in images existed
- official release
- added strip attribute
- minor fixes for wordpress new admin