WordPress.org

Ready to get started?Download WordPress

Forums

Scripts n Styles
[resolved] installed on multisite and not working? (10 posts)

  1. talynndar
    Member
    Posted 2 years ago #

    I installed on my multisite and network activated.

    I have a javascript I want to run on all sites in my multisite- this script needs to be placed in theme just before </body> and before </head>

    I added under global in both script spots - and its just not working?

    I know the script works as I can hand add it the theme - And I tried just on basic ten twenty theme.

    Its like the script is ignored and I cannot figure out why?

    this part - Enqueue Scripts: has me very confused as there are no instructions regarding... I tried jquery and a few other things

    appreciate all help

    my true wish a network version that I can use to same script to all blogs in one sweep!

    http://wordpress.org/extend/plugins/scripts-n-styles/

  2. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    I've developed the plugin mostly with single install in mind. The MultiSite functionality extends the normal behavior to *each* site.

    (My original thinking was that in MultiSite, only the "super admin" has permissions appropriate for the plugin, so I considered it a super-admin only tool, hence when a super-admin installs the plugin its available on all sites in the network. The "network" activation is misleading, and not needed yet. I'll take that particular restriction out next release until there's more functionality specific to networks.)

    To confirm, each site would need the script added individually.

    I had not considered how useful adding one script to every site would be. I can try to add the functionality you are looking for in a later release.

  3. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    "Enqueue Scripts" is just a list I put together of WordPress registered script handles. Activating anything in that list just includes the appropriate built-in WordPress script. So, for example, selecting jQuery on the Global screen, would include WordPress's jQuery library on every page in that particular site. This is in case your custom scripts are dependent on jQuery or some other library.

  4. talynndar
    Member
    Posted 2 years ago #

    I have added scripts to a few sites on multi-site - even tried with basic theme - its just not working? how can I figure out why? it does work on multisite, right?

  5. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    It just occurred to me to ask how you are including the file: On the Global tab of the Scripts n Styles admin page, what are you putting into the box?

    I've tested on multisite with var test = ""; and it shows up on each page of that site.

    Keep in mind that embedding the script is how Scripts n Styles works, so linking, e.g. http://www.example.com/script.js won't work.

    The only other thing I can think of is that the theme might be missing the wp_head action... if this is the case, you can add <?php wp_head(); ?> directly above the closing </head> tag. (This is in the basic default TwentyTen and TwentyEleven themes so I don't think that's the issue.)

    If it's neither of these things, I'm seriously at a loss for why it isn't working :-/ I'm sorry. I'd need more to go on.

  6. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    It's possible that I've found a bug.

    I've tested on a multisite blog that isn't the main blog and noticed the footer script isn't working... but I don't know where the bug is.

    The Head Script and the Style did work for me.

    I'll continue testing different configurations...

  7. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    NM, it's working for me. I've tested multisite on subdomains, and on different domains via domain mapper. I haven't tested folder installed blogs, though I can't see how that would have an impact.

  8. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    The only thing I can think of is you are trying to link a discreet javascript file, in which case this plugin doesn't help with that. If that's what you are doing, you can copy and paste the contents of the javascript file into the box, but that isn't recommended. There might be some sort of obscure line-ending issue I don't know about causing problems with copy-paste.

  9. talynndar
    Member
    Posted 2 years ago #

    I have tried various javascripts

    I use the theme ahtahuala (or however its spelled) and the theme offers a spot where you can add so its inserted similarly to in your plugin - these scripts work, or if I add them into themes directly (using ftp) - I am not super javascript savvy :(

  10. WraithKenny
    Member
    Plugin Author

    Posted 2 years ago #

    I've run out of ideas. I can't duplicate your issue. Can you share a link to where you are testing this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic