• I’m wanting to add a dropdown panel to all sites on the network (for a theme demo site).

    Instead of adding it individually to the header of each site, is there a function or plugin I can use that will add a block of code to all sites from the network admin?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Depends on where you’re talking about. You mean in the theme? Are they all using the same one? If not, you can hook into the header: https://wpmututorials.com/plugins/how-to-hook-into-the-footer/ (just use wp_head() instead of wp_footer ?? )

    Thread Starter bwerner120

    (@bwerner120)

    Each site would be using a different theme (each one would be to demo WordPress themes).

    The wp_head() may work. If you need an example of what im trying to do, its similar to the WordPress Theme Demo Bar plugin except that the dropdown would switch between the sites on the network in MU.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    WP_head will do it. Or if you activate the Admin-bar for all users, logged in or out, you can mess with that too.

    You could also take that theme demo bar plugin and fork it to list the sites instead. Network activate it or toss it in mu-plugins.

    (loads of theme shops are using multisite to show their themes)

    Thread Starter bwerner120

    (@bwerner120)

    Thanks Ipstenu and Andrea_r for your ideas. Im going to be working on it this weekend.

    This seems like a useful plugin and would be of a benefit to the community. If I do get it working, I think im going to release this for everyone.

    I’ve seen some sites pull the network in with an iframe, and just code a drop down in the top of the frame. Plenty of ways to do it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add code to all sites?’ is closed to new replies.