Support » Plugin: Scripts n Styles » Script code for all posts

  • Resolved roberzim



    I installed and used this great plugin and it works fine.
    I can include scripts for each page and post or I can include scripts for all pages and posts without distinction. How can I include scripts only for all posts?

    Thank you,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WraithKenny


    Typically, I use if ( ! jQuery('body').hasClass('archive') ) { return; } before the code I want to run only on blog style pages. You might have to inspect different types of post pages to get the correct combination of body classes.


    Thnx very much for the plugin. I need some help. Everything works great but plugin doesn’t add to the product category admin pages in woocommerce.

    Gere is the body class of that page
    “<body class=”archive tax-product_cat term-ajax-keypad term-210 _masterslider _msp_version_2.26.0 woocommerce woocommerce-page loaded headhesive”><header class=”banner navbar navbar-default navbar-static-top dark-header headhesive–clone” role=”banner”>”

    How can I do that the Plugin: Scripts n Styles will be added to all admin pages

    Thank You in advance


    The plugin works exactly what I want until recently. I receive the following error on Post and Page editor whenever I do the ‘Add media’ or ‘Feature images’ action.

    Failed to load content css:

    I thought it should have something to do with one of your code.

    Can you help me to sort this out please?



    Plugin Author WraithKenny


    @deft1z The plugin adds itself to every public single post type. It doesn’t add itself to archives or taxonomies. For those, you should use the global boxes and scope it to the appropriate body class.

    @aumattc Thanks for the bug report, I’ll see what I can find out.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Script code for all posts’ is closed to new replies.