Support » Fixing WordPress » Creating A Widget

  • Resolved SickSquirrel


    I’m trying to create a widget. I drag over Text but the text I need to input is code

    [my-widget id="7" title="Name Of Widget"]

    So I tried it as a Menu. No good.

    So, which item do I drag over to use that will accept my code?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The text widget won’t execute shortcodes (code using [square brackets like this]) by default. You either need to add this to your theme’s functions.php file:

    add_filter('widget_text', 'do_shortcode');

    Or if you don’t want to try editing the theme, install this plugin:

    Either way, you should then be able to use the text widget and have your shortcode work.

    I heard from the guy who coded this. It’s added to the other plugin which he forgot to tell me to install. Tomorrow I’ll install that then see if the code has an explanation.

    If I had the proper instructions …

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating A Widget’ is closed to new replies.