Last Updated: February 25, 2016
·
714
· idered

[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');