Use shortcodes in Widget

Home/Wordpress tricks/Use shortcodes in Widget

Use shortcodes in Widget

Shortcodes if used in widgets will not be replaced by the relavant code. You can make them display proper code by using this code.

// display shortcode in widgets

if ( !is_admin() ){

    add_filter('widget_text', 'do_shortcode', 11);

                 }



Enhanced by Zemanta

Yumna Tatheer

Yamna Tatheer is a WordPress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

More Posts

Follow Me:
Facebook

About the Author:

Yamna Tatheer is a Wordpress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

Leave A Comment

WhatsApp chat