WordPress.org

Ready to get started?Download WordPress

Forums

Basic Google Maps Placemarks
Shortcode in category description throws error (7 posts)

  1. BigBelly
    Member
    Posted 8 months ago #

    Is it possible to use [bgmp-map] shortcode in category description?

    It throws error:

    Basic Google Maps Placemarks error: JavaScript and/or CSS files aren't loaded. If you're using do_shortcode() you need to add a filter to your theme first. See the FAQ for details.

    http://wordpress.org/plugins/basic-google-maps-placemarks/

  2. Ian Dunn
    Member
    Plugin Author

    Posted 8 months ago #

    "See the FAQ for details." :)

  3. BigBelly
    Member
    Posted 8 months ago #

    Hi Ian, I really tried, but I'm not sure, what exactly from FAQ, Installation or Other notes should help me :( I might be blind or stupid :)

    I'm not using do_shortcode, simply [bgmp-map]...

  4. Ian Dunn
    Member
    Plugin Author

    Posted 8 months ago #

    Just use this instead, it'll enqueue the scripts on every page:

    add_filter( 'bgmp_map-shortcode-called', '__return_true' );
  5. BigBelly
    Member
    Posted 8 months ago #

    Thanks!

    Unfortunately it works only with do_shortcode("[bgmp-map ...]") in template code, but not with shortcode [bgmp-map ...] in category description.

    At least it doesn't write this error anymore:
    Basic Google Maps Placemarks error: JavaScript and/or CSS files aren't loaded. If you're using do_shortcode() you need to add a filter to your theme first. See the FAQ for details.

    But map is not shown anyway. BGMP CSS file is loaded correctly, but in page source there is no BGMP JS code.

    Any ideas? TY!

  6. Ian Dunn
    Member
    Plugin Author

    Posted 8 months ago #

    Does it just display "[bgmp-map]" instead of showing that map? If that's the case, then that would probably indicate that WordPress doesn't parse the category description for shortcodes by default. There are probably solutions for that if you search around, but it's a generic WordPress question, rather than something specific to this plugin.

  7. BigBelly
    Member
    Posted 8 months ago #

    no, unfortunatelly it doesn't display anything - no error, no "[bgmp-map]" etc :(

Reply

You must log in to post.

About this Plugin

About this Topic