WordPress.org

Ready to get started?Download WordPress

Forums

Spots
[resolved] Shortcodes in Spots (8 posts)

  1. katart17
    Member
    Posted 2 years ago #

    I can't seem to get shortcodes in spots to work correctly. Is there any reason why?

    http://wordpress.org/extend/plugins/spots/

  2. cehwitham
    Member
    Posted 1 year ago #

    I'm also interested in using shortcodes in spots, especially to display Gravity Forms.

  3. sanchothefat
    Member
    Plugin Author

    Posted 1 year ago #

    Hey, can you guys confirm that shortcodes aren't working with version 1.0.5?

    Testing it locally it works fine. Can you tell me what shortcodes aren't showing up so I can test with the plugins/setup you have?

  4. cehwitham
    Member
    Posted 1 year ago #

    I'm using Spots 1.0.6, WordPress 3.3.2, Gravity Forms 1.6.2 And Twenty11 theme.

    The Gravity Form shortcode is now being processed but seemingly incorrectly as it is outputing Delete|Duplicate|Edit links for each field as you can see here:

    http://www.cehwitham.com/web/

  5. sanchothefat
    Member
    Plugin Author

    Posted 1 year ago #

    I'm wondering the spot has been processed and cached while you were in the admin area.

    Gravity forms is a bit odd in that it uses the same loop function to output the fields and if you're in the admin it's displays the editable markup, otherwise the actual form input markup.

    Can you tell me if it sorts itself out when you add the following to your functions.php?

    define('SPOTS_CACHE_TIME', 0);
  6. cehwitham
    Member
    Posted 1 year ago #

    Yeah that's solved it. Looks like your prediction about it caching the GF whilst in admin was correct and even when logged in and viewing the front end of the site, it processes it correctly with the cache time set to 0.

    I guess on small sites, not caching the spots ins't going to cause a big headache for anyone. On larger sites, Calling GF outside of spots is likely to be a better way forward. GF has it's own widget and template output so shouldn't be a massive issue.

  7. sanchothefat
    Member
    Plugin Author

    Posted 1 year ago #

    I tend to avoid shortcodes and prefer to use widgets myself. For something like GF it's dynamic anyway so you could only use in AJAX mode with spot caching turned on.

    For larger sites I would recommend a site-wide cache and turning off the spots cache anyway.

    Your're right as well, on a small site a spot is a single query so it isn't a big overhead really.

    I have however updated the plugin (1.0.7) so that the caching is done on the front end output and not in admin context. This should improve things in general as well.

  8. cehwitham
    Member
    Posted 1 year ago #

    Thanks again. It's been a real time saver for us and something clients really find useful too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic