This plugin provides a simple [meta] shortcode that allows you to fetch meta information for the current $post.
Author: | Eric King (profile at wordpress.org) |
WordPress version required: | 3.0.0 |
WordPress version tested: | 4.4.0 |
Plugin version: | 0.4 |
Added to WordPress repository: | 20-05-2014 |
Last updated: | 08-12-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | http://phplug.in/ |
Total downloads: | 1 268 |
Active installs: | 10+ |
Click to start download |
This plugin provides a simple [meta]
shortcode that allows you to fetch meta information for the current $post
.
There are options to return a single value, multiple values joined by a user defined string, or a JSON string.
Examples:
[meta name="your_meta_field"]
This will return the value of "your_meta_field". If the value is an array, it will return a comma separated list, unless you specify an alternative join string.
[meta name="your_meta_field" single="false"]
By default, [meta] will return a single value. If you have multiple meta fields with the same name, you can get them all by setting single="false".
[meta name="your_meta_field" single="false" json="true"]
This will return the JSON encoded value of "your_meta_field".
[meta name="your_meta_field" single="false" join="|"]
This will return a pipe separated values of "your_meta_field".
[meta name="your_meta_field" shortcode="false"]
By default, the value will be passed to do_shortcode, unless you turn if off.
[meta name="your_meta_field" filters="true"]
There are a couple filters available if you want to filter the value. They are called after do_shortcode and before any JSON/array handling. They are on be default, but can be turned of with filters="false". The filters are "meta_fetcher_value" and "meta_fetcher_{$name}".
ChangeLog