• Resolved Andry

    (@blackstar1991)


    Can you suggest how to implement that scripts and styles that belong to the plugin connected only to those pages on which they are involved?

    I have 18 stylesheets and more than 25 scripts plugged into the
    tag of each page, which I don’t need on the Home page, Simple page, Post, Categoty etc. https://joxi.ru/p27djMOCZ03dJA This screws up performance and Google metrics

    How add that sctripts and styles only for pages where they need ? Somthing like…

    if (is_page('user')):
            wp_enqueue_style('um_componets',);
    endif;

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Encapsulation of pluggable data for the plugin’ is closed to new replies.