• Resolved roberzim

    (@roberzim)


    Hello,

    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,
    rob.

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

    (@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.

    Hello!

    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

    Hello,

    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: https://fittygang.com/wp-admin/admin-ajax.php?_wpnonce=5fde5abd69&post_id=3155&action=sns_tinymce_styles

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

    Can you help me to sort this out please?

    Cheers,

    Matt

    Plugin Author WraithKenny

    (@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.