This topic contains 4 replies, has 2 voices, and was last updated by Sofia Moss Sofia Moss 4 years, 8 months ago.

Regarding: Load plugin assets (js and css files) only when needed

  • Hi!
    I like your plugin very much!
    This thread is closed: http://superstorefinder.net/support/forums/topic/load-plugin-assets-js-and-css-files-only-when-needed/

    The code is working except of the inline code.

    The plugin loads in every page much inline css (style options from backend) and js (translations) script. Can you please provide a button or function with the next update to only load all scripts of Super Storefinder on specific pages?

    So I can remove the code from my functions.php and what’s more important to only load the inline css and js on the page where I use super store finder.

    WOULD BE GREAT!

    Sofia Moss
    StaffSuper ContributorUser Level

    Hi there,

    Thank you for your suggestion, we have moved this post into Features Wishlist forums so our devs team can analyze and have a closer look whether to include this in future updates.

    Cheers,
    Sofia

    Sofia Moss
    StaffSuper ContributorUser Level

    Hi there,

    Our devs feedback as below.

    Devs feedback:

    Suggest to open ssf-wp-functions.php and go to line 397

    and replace this code below:

    if ($show_on_all_pages || $on_ssf_wp_page  || $show_on_archive_404_pages || $show_on_front_page  || $on_ssf_wp_post || $show_on_custom_post_types || function_exists('show_ssf_wp_scripts') || $show_on_page_templates)

    With this code:

    if ($on_ssf_wp_page  || $show_on_archive_404_pages)

    Cheers,
    Sofia

    Hi,

    will you add this in the next update? Because the changes are gone, when a new plugin update is launched.

    THANK YOU!

    Sofia Moss
    StaffSuper ContributorUser Level

    This option to load plugin assets has been added in patch 6.1 here.

The topic ‘Regarding: Load plugin assets (js and css files) only when needed’ is closed to new replies.