[WP] Theme options shortcode
A simple wordpress shortcode for you today :) It allows to display theme options using following code:
[option name="OPTION_NAME"]
And here's a source:
function option_shortcode($atts) {
$options = get_option( 'my_options' );
return $options['my_'.$atts['name']];
} add_shortcode('option','option_shortcode');
Written by Kasper Mikiewicz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shortcode
Authors
etienne_tremel
1.021K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#