Support » Themes and Templates » Need shortcode functionality in custom Theme Options

  • Resolved jstudios


    I am developing my own theme and just started building its own “Theme Options”. There are 3 “<textarea>” blocks that grab the data from it and output it to the page in the footer area. One of them is the “Copyright” section.

    I made a “[year]” shortcode and when I type it in the “<textarea>” under Theme Options, it just outputs it as “[year]” instead of “2012” on the website.

    I know I have to add some sort of filter to allow shortcodes, but I don’t know where. I’ve tried a few methods but I just can’t get it to work.

    Any help appreciated.


    function currentYear() {
    add_shortcode('year', 'currentYear');


    <p class="text-option"><?php _e( 'Left Footer Content:', 'jframe' ); ?>
    <textarea id="jframe_theme_options[leftfootercontent]"
    class="large-text" cols="50" rows="5" name="jframe_theme_options[leftfootercontent]"><?php echo esc_textarea( $options['leftfootercontent'] ); ?>
    <label><em>Content for left side of the footer.</em></label>


    <p class="copyright">
    			<?php if ( isset( $options['leftfootercontent'] ) ) {
    				echo $options['leftfootercontent'];

  • The topic ‘Need shortcode functionality in custom Theme Options’ is closed to new replies.