WordPress.org

Forums

[resolved] Creating A Widget (3 posts)

  1. SickSquirrel
    Member
    Posted 1 year ago #

    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?

  2. Michelle
    Member
    Posted 1 year ago #

    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:

    http://wordpress.org/plugins/use-shortcodes-in-sidebar-widgets/

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

  3. SickSquirrel
    Member
    Posted 1 year ago #

    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 ...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags