Support » Plugin: Custom Facebook Feed » Add filters/options to enqueue scripts and styles

  • Resolved eventualo

    (@eventualo)


    Hi, on a site where I’m using your plugin, I have to load also the FB Customer Chat.
    But from a few days, the Chat has its own SDK ( https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin/sdk#install ) and it cannot work if inside page there is loaded also the standard SDK.

    I need to load only Chat SDK, but the styles and the scripts of your plugin, including the FB-SDK, are included directly inside the shortcode html.
    Please can you load scripts and style using standard WP enqueue functions?
    Please can you provide filter hooks and maybe options to disable the automatic load of scripts and styles?

    Thank you very much

    • This topic was modified 4 months ago by  eventualo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author smashballoon

    (@smashballoon)

    Hi @eventualo,

    We load the plugin’s main styles and scripts using the standard WordPress enqueue functions, but not the Facebook SDK. The SDK is only used for the Facebook “Like Box” widget which we optionally include in the feed. If you disable the Like Box widget in the following location then the SDK should be excluded: Facebook Feed > Customize > General > Like Box / Page Plugin > Show the Like Box

    Could you try that and let me know whether it resolves your problem?

    Many thanks,

    John

    eventualo

    (@eventualo)

    Hi @smashballoon thanks fot your reply.
    When disabling the Like box, the FB-SDK is not loaded.
    But I’d like to have also the Like box enabled.
    Please can you add hooks when the SDK is loaded? So we have the chance to disable the FB-SDK loading via filter. Does it make sense for you?
    Thanks again.

    Plugin Author smashballoon

    (@smashballoon)

    Hi @eventualo,

    I’ll look into doing this during development of the next update. In the meantime though, you could just add the Facebook widget manually below the feed shortcode using the direct HTML:

    <iframe src="https://www.facebook.com/plugins/page.php?adapt_container_width=true&app_id=&container_width=300&hide_cover=false&hide_cta=false&href=https://facebook.com/YOUR_PAGE&locale=en_US&sdk=joey&show_facepile=false&show_posts=false&small_header=false&width=300px"></iframe>

    Just replace the YOUR_PAGE part with your Facebook page ID.

    Let me know whether that helps!

    John

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.