• Resolved kapppa

    (@kapppa)


    Hi there,

    is it possible that the code used for the plugin is only loaded on those pages where it′s really needed? Now, the product review code (javascript and css) is loaded on all the pages on my website even if there is no use for it because i don′t use the review box on that pages.

    In the settings i have of course set it to not show review box by default.

    Would be great if the enqueuing would work.

    Gr.

    https://www.ads-software.com/plugins/wp-product-review/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Codeinwp

    (@codeinwp)

    The thing is a bit tricky because we need to load it for the widget, we will see how we can improve that.

    Thread Starter kapppa

    (@kapppa)

    That would be great! Keep up the good work.

    Gr

    Would like also to see this feature. To load the script and css when only needed.

    Till then is there a quick work around for this?

    You can at least load the scripts/stylesheets in the footer:

    In /wp-product-review/wp-product-review.php

    change line 426:
    add_action('wp_head', 'cwppos_pac_print');

    to

    add_action('wp_footer', 'cwppos_pac_print');

    Plugin Contributor MariusG

    (@marius_codeinwp)

    Thanks for the suggestion @camdoughcat, we’ll change this in our future updates.

    Best regards,
    Marius

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘style, scripts only on actual page / post-pages’ is closed to new replies.