Widget as shortcode – tips

Want to keep the widget title to identify it from other instances of the same widget, but want to hide the title when the widget is used in a shortcode (ie in a page)?


Error: Your Requested widget "widgetname " is not in the widget list.
  • [do_widget_area sidebar-1]
    • [do_widget_area sidebar-2]
      • [do_widget_area sidebar-3]
        • [do_widget_area widgets_for_shortcodes]
          • [do_widget id="search-3"]
          • [do_widget id="rss-2"]
          • [do_widget id="rss-4"]
        • [do_widget_area wp_inactive_widgets]
          • [do_widget id="search-4"]
          • [do_widget id="search-2"]
          • [do_widget id="recent-posts-2"]
          • [do_widget id="tag_cloud-3"]
          • [do_widget id="text-2"]

        Want to reference a pre-existing widget configuration in a sidebar?


        Error: Your Requested widget "sidebar=sidebar_name widget_id" is not in the widget list.
        • [do_widget_area sidebar-1]
          • [do_widget_area sidebar-2]
            • [do_widget_area sidebar-3]
              • [do_widget_area widgets_for_shortcodes]
                • [do_widget id="search-3"]
                • [do_widget id="rss-2"]
                • [do_widget id="rss-4"]
              • [do_widget_area wp_inactive_widgets]
                • [do_widget id="search-4"]
                • [do_widget id="search-2"]
                • [do_widget id="recent-posts-2"]
                • [do_widget id="tag_cloud-3"]
                • [do_widget id="text-2"]

              Shortcode a widget in a page or post

              Available  at wordpress now – This plugin allows you to use any widget as a shortcode in a page or post with any theme.  While many plugin authors do provide a widget and a shortcode, not all do.  With this plugin there is no need to use the hybrid theme or create a special page template just to use a widget in a page or post.

              For example


              • Widget not in any sidebars
                  will show the second tag cloud widget
              •  
                Error: Your Requested widget "query posts " is not in the widget list.
                • [do_widget_area sidebar-1]
                  • [do_widget_area sidebar-2]
                    • [do_widget_area sidebar-3]
                      • [do_widget_area widgets_for_shortcodes]
                        • [do_widget id="search-3"]
                        • [do_widget id="rss-2"]
                        • [do_widget id="rss-4"]
                      • [do_widget_area wp_inactive_widgets]
                        • [do_widget id="search-4"]
                        • [do_widget id="search-2"]
                        • [do_widget id="recent-posts-2"]
                        • [do_widget id="tag_cloud-3"]
                        • [do_widget id="text-2"]
                      will allow you to have a selection of posts listed in your page.    The plugin uses a dummy sidebar called “shortcode” which allows one to use the widgets user interface to specify the custom settings.

                    The shortcode sidebar is a named widget sidebar only used to set up the widget settings.

                    Warning: Themes with numbered (or totally unnamed sidebars) do not work well this. Somehow since the plugin is creating the shortcode sidebar rather than a theme (and plugins seem to run befor the theme code), wordpress allocates it the number one slot. Named sidebars are okay, but others relying on being no.1 or the one and only are pushed out. Fixed in version 1.12.

                    Primarily I have in mind that one would want to list posts by excerpts  for a category or a tag group within a discussion of the subject.  Thus one could have multiple portfolio pages.  This is achieved using  Justin Tadlocks query posts widget with this do_widget shortcode.  One could also try using the template tags shortcode plugin also by Justin Tadlock to achieve similar functionality. The differences with this plugin are

                    • any widget could be used (as opposed to template tags)
                    • no special UI (User Interface) needed as each widget’s own UI is used to set any settings

                    I’d love to hear other ways that people might decide to use this plugin.

                    Download: amr_shortcode_any_widget

                    Demonstration of t wo widgets called with shortcodes from within page or post text
                    Demonstration of two widgets called with shortcodes from within page or post text
                    The Shortcode Sidebar - Add the widgets that you wish to use as shortcodes.
                    The Shortcode Sidebar - Add the widgets that you wish to use as shortcodes.
                    Set the widget's settings
                    Set the widget's settings
                    Edit thepage, inserting the do_widget shortcode
                    Edit thepage, inserting the do_widget shortcode