free website hit counter
RSS Feed     Twitter     Facebook
Room 09 Shop
Read Detail
Live Demo
Buy Now
Simplicity eCommerce
Read Detail
Live Demo
Buy Now
Bazar Shop
Read Detail
Live Demo
Buy Now
The Retailer
Read Detail
Live Demo
Buy Now
Phomedia E-Commerce
Read Detail
Live Demo
Buy Now

Meta Functions Shortcode Plugin

Font size:
  • Sharebar

The “Meta Functions Shortcode” Plugin installs the Shortcode ‘meta’. With it you can access the custom fields of your articles by a shortcode……


Version – 3.4

Description :

The “Meta Functions Shortcode” Plugin installs the Shortcode ‘meta’. With it you can access the custom fields of your articles by a simple shortcode.

Shortcode Syntax: [meta func="" name="" alt=""]

The shortcode has three functions yet:

  1. func=”url” Displays a link using your custom field in “name” as the link target and “alt” as the caption. If “alt” is empty the link target is used as the caption.
  2. func=”plain” Simply displays the custom field in “name” as plain text. If the field is empty it displays the text in “alt”.
  3. func=”img” Inserts the image at the url in your custom field “name” into the article. The “alt” argument is used as the images alternative text attribute.
  4. More functions in later versions of the plugin… Or extend the plugin on your own. See Extending the Plugin (under Other Notes) for details.


[meta func="url" name="download_url" alt="Download here"]

This little code in your article displays a link using your custom field “download_url” as the link target and “Download here” as the caption. If you leave the “alt” argument empty then it uses the link target as the caption.

The resulting html code is:

<a href='{download_url}'>{alt}</a>

Installation :

Install it like every other wordpress plugin:

  1. Upload the directory meta-functions-shortcode to the /wp-content/plugins/ directory
  2. Needed files: meta-functions-shortcode.php, mfs_options_form.php, mfs_options_handler.php and mfs_scripts.js (must be in the same directory)
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Use it in your WordPress articles or where your shortcodes are allowed

Screenshots :

  1. meta-functions-shortcode screenshot 1This is a screenshot of the extionsion mechanism in the admin panel.

Other Notes :

Extending the Shortcode

Method 1: Hardcoded

You can extend the plugin by adding the PHP function

function meta_functions_shortcode_{func}($meta, $alt="") {
       return "your desired text or generated html content";

by writing your own plugin file with the function in it. Be sure to replace {func} with your desired function name (will result in the parameter “func” in the shortcode). $meta will be the value of the custom field and $alt the “alt” parameter.

The function should return the text by which the shortcode will be replaced. For example the “_plain” function simply returns $meta or $alt if $meta is empty.

Method 2: In the admin panel

This method is more convenient. You can add new functions in the admin panel. For this go to the options page called “Meta Functions Shortcode”. Here you can enter a new function name, specify parameter names and set the output html code with the parameters.


  • Function Name: link
  • Function Parameter Names: link_url, link_caption
  • Function Result Code: <a href='{link_url}'>{link_caption}</a>

If you now enter the shortcode [meta func=”link” link_url=”download_url” link_caption=”download_caption”] then in the article/page it will be replaced by <a href='contents of custom field download_url'><i>contents of custom field download_caption</i></a>.

Detail Here: –
Share with: Twitter Delicious Facebook Digg Stumbleupon Wordpress Googlebuzz Myspace Gmail Newsvine Favorites More
You can leave a response, or trackback from your own site.
Some More Popular News

Leave a Reply


Recent Search
Copyright© 2015 WordPress Planet | All Right Reserved.