• Resolved matt-thomas-photography

    (@mattthomas-photography)


    Within the HTML there’s a section

    </script><!-- Instagram Feed JS -->
    <script type="text/javascript">
    var sbiajaxurl = "https://URL/wp-admin/admin-ajax.php";
    </script>

    What is the purpose of this and is it really needed? As looks like an extra JS request just for the WP Admin page?

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

    (@smashballoon)

    Hey @mattthomas-photography,

    This code itself doesn’t make a JavaScript request at all, it simply defines the path to the WordPress admin-ajax.php file so that when the plugin needs to get data from, or save data to, your database via ajax/JavaScript then it has the correct path to the file. The admin-ajax.php file is the standard way in WordPress of interacting with the database from the front end of your site. For example, when loading more posts into the feed using the “Load more” button. A JavaScript request is made to the admin ajax file to get new posts and cache them in the database.

    Let me know if that helps at all, or if you have any further questions, and I hope you’re having a great day!

    John

    Thread Starter matt-thomas-photography

    (@mattthomas-photography)

    Thanks for letting me know, I wasn’t sure if it would be impacting the site speed so I disabled the hardcode using Asset Cleanup. However if nothing is pulled then I’ll leave it there as my IG feed is only 6 photos, no load more or follow button. So guessing the AJAX request is never run

    Plugin Support Smash Balloon Joel

    (@joelsmashballoon)

    Hey @mattthomas-photography,

    Good to hear it is working for you with it removed for now. If you do run into any issues retrieving the latest posts in the future do test re-enabling the AJAX link first!

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘var sbiajaxurl – Is This Needed?’ is closed to new replies.