WordPress.org

Ready to get started?Download WordPress

Forums

OptionTree
[resolved] allow shortcodes in textarea (5 posts)

  1. Paul de Wouters
    Human Made
    Posted 3 years ago #

    I'd like to enable the use of shortcodes in the text areas. For example, when I use OptionTree with a genesis child theme, there are shortcodes available for use in the footer text, so if I make the footer text editable with an option, I'd like to take advantage of the shortcodes. at the moment, it just renders the shortcode without executing it.

    http://wordpress.org/extend/plugins/option-tree/

  2. Derek Herman
    Member
    Plugin Author

    Posted 3 years ago #

    In you theme use the following code to render the shortcode:

    echo apply_filters('the_content', $textarea);

    Where $textarea is the value of your saved textarea from a get_option_tree() function call. Hope that helps. I'll look into a more permanent solution during the next development cycle.

  3. Paul de Wouters
    Human Made
    Posted 3 years ago #

    thanks Derek

  4. Jesper Johansen (jayjdk)
    Member
    Posted 3 years ago #

    or echo do_shortcode( $textarea );

  5. Derek Herman
    Member
    Plugin Author

    Posted 3 years ago #

    Jayjdk option is better.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic