• Resolved cmcnaught

    (@cmcnaught)


    New to WP so forgive me if I trip over my feet.
    Some additional help text would be useful for users wanting to use the shortcake feature. Putting a shortcode in a page requires you to create an instance of the widget. If you are using one already in a sidebar no problem. If not, you must add it to ‘Inactive Widgets’ and configure it, generate shortcode. The problem with it Inactive Widgets is that it is at risk for being deleted with that handy ‘Clear Inactive Widgets’ button. Also, if you want to configure several with blank titles, you can’t tell them apart without opening them to see the location or shortcode.
    I solved these issues with ‘amr shortcode any widget plugin’. This creates a pseudo sidebar for creating widget instances. It also has the feature title=false so the title can be there for identification but hidden on the page. The issue then is to know the name of the gm widget instance. It turns out to be googlemapswidget-n where n is the google maps widget id. Hopefully all this is true and useful for someone else looking to add a gmw to a page or a post. Some of this would be useful in the documentation.

    https://wordpress.org/plugins/google-maps-widget/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WebFactory

    (@webfactory)

    Hi, thank you for your comment!

    GMW was originally envisioned as a widget (and it still is, primarily a widget) and the shortcode functionality was added as per request by many users. Hence, things are not ideal and we’re aware of that. Usability could definitely be improved. My personal preference is to create a sidebar that’s not used anywhere in the theme and then put all widgets used as a shortcode there. Same as you did with the plugin. That’s a straightforward approach and works very well. Other stuff you wrote is also correct and can definitely be used by others.

    We have plans to improve this functionality very soon.

    Thread Starter cmcnaught

    (@cmcnaught)

    Thanks for your quick feedback. Not sure my knowledge level is up to being able to create a sidebar (can this be done in a ‘child’ theme?) but it sounds like a cleaner solution than the amr… plugin. Thanks for the work you do!
    C

    Plugin Author WebFactory

    (@webfactory)

    Sure, you can put in the (child) theme’s functions.php file. Have a look at this example, it’s all you need – https://codex.wordpress.org/Function_Reference/register_sidebar

    You’re welcome 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Shortcode use’ is closed to new replies.