• Resolved j1mm1nycr1cket

    (@j1mm1nycr1cket)


    Hello, the free version of this plugin looks great but although I can see my Insta feed in the feeds preview, when I include it in a page template, using do_shortcode, the wrapper renders in the page, but it’s empty. All I get is: <div class="spotlight-instagram-feed" data-feed-var="632a61e1"></div>
    …followed by three <input type="hidden"> (all of which seem to have relevant params in them, as if the correct data is being retrieved).
    But why no Insta images..?
    I’m using ACF, Classic Editor and WP SVG images

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mark Zahra

    (@markzahra)

    Hi @j1mm1nycr1cket, can you please test the feed using the shortcode or block normally, in a WordPress page, so we can make sure that the problem is isolated to the do_shortcode() code?

    Also, do you see any errors in your browser console when viewing the page template?

    Thread Starter j1mm1nycr1cket

    (@j1mm1nycr1cket)

    Hi Mark, Thanks for the reply. I have added the shortcode in the ‘normal’ way, to a page, loading it using the_content(); and I get the exact same result. Empty wrapper div, followed by 3 <input type="hidden" tags, which have json strings in them, showing what looks like relevant data sets.
    There are no errors in the console (Chrome dev tools)…

    Plugin Author Mark Zahra

    (@markzahra)

    Hey @j1mm1nycr1cket, can you please try using the shortcode or block in the WordPress admin rather than applying it in the template files? That’s what I meant earlier, sorry for the confusion.

    Thread Starter j1mm1nycr1cket

    (@j1mm1nycr1cket)

    Heh – that’s what I meant earlier too ;o)
    I made a new page and added the shortcode into the standard editor block of that new page. I just typed the shortcode into the WYSIWYG editor, via the WP admin. It’s being rendered on the page through the page.php template, using the loop and the_content();
    I only mentioned the_content(); before to make a distinction between that method and the do_shortcode(); method as I thought that’s what you wanted me to test.
    …but yeah, that’s how I’m doing it, to test that it’s not my do_shortcode(); implementation that’s the issue and it appears that it’s not, since I get the same result after adding the shortcode via WP admin in a standard content editor box.
    Does that make sense now.?

    Plugin Author Mark Zahra

    (@markzahra)

    Oh, sorry, my mistake!

    Great, so that confirms that it’s not the do_shortcode method causing the problem. Could you share a link to the page with the broken feed if the site is live, please?

    If you’re not comfortable sharing it here, you may contact us directly.

    Thread Starter j1mm1nycr1cket

    (@j1mm1nycr1cket)

    Ok, I’m glad we agree ;o)
    It’s all on localhost at the moment. I’ll have to make an online database etc etc and get back to you. Thanks

    Plugin Author Mark Zahra

    (@markzahra)

    Sure, we’re here to help when you have that set up. Alternatively, if you contact us via email we may be able to do more through some screenshots or screenshares.

    Thread Starter j1mm1nycr1cket

    (@j1mm1nycr1cket)

    Yep, thanks. I’ve set it up and sent you the link etc through your form here https://spotlightwp.com/support
    Look forward to hearing from you.

    Thread Starter j1mm1nycr1cket

    (@j1mm1nycr1cket)

    OK, so I worked it out. In case anyone is passing by and looking for a solution, it was (or perhaps, should have been) pretty obvious in the end. In my custom theme, I hadn’t included <?php wp_footer(); ?> in my template, which is necessary to load js files etc as it provides a ‘hook’ for plugins to load their assets.
    So, I whacked that in before </body> and the plugin started to work.
    I notice that Spotlight loads a staggering 15 separate js files in order to display the feed, so arguably not the most efficient plugin, but at least it’s now showing my feed in my page template.

    Thread Starter j1mm1nycr1cket

    (@j1mm1nycr1cket)

    Oh, my mistake “only” 10 js files and 5 css files. But meh.

    Plugin Author Mark Zahra

    (@markzahra)

    @j1mm1nycr1cket I’m glad you managed to figure it out! ??

    Just a small correction on the last point. Spotlight doesn’t load that many JS files. It loads about 6 scripts at most (less when using only the free version). The others are most likely from WordPress itself.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Feed shows in settings preview but not on front end’ is closed to new replies.