开发者 | horshipsrectors |
---|---|
更新时间 | 2017年7月14日 01:55 |
PHP版本: | 4.0.0 及以上 |
WordPress版本: | 4.8.0 |
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. horshipsrectors_get_image_from_post();
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: horshipsrectors_get_image_from_post('before=<p>&after=</p>');
If you'd like to link to the post (remember it's not live yet) you can do so by calling: horshipsrectors_get_image_from_post('link=true');
You can specify which image is returned using the code: horshipsrectors_get_image_from_post('image=2');
If you would like to strip the attributes such as width and height from the returned value: horshipsrectors_get_image_from_post('strip=true');
Finally, if you'd like to copy the results into a variable you can return the results as follows: horshipsrectors_get_image_from_post('show=false');