• We are currently developing a school district’s websites in Multisite. Is there any way for an administrator to set a network-wide notification (like a simple red bar at the top of the page) for every site on the network at once? I’ve looked around and found little on how to make a plugin or php post data to every page on a network. I can only assume this can be accomplished by some lines of php and/or some added functionality to the WP core but have no idea where to start.

    Any ideas? I was thinking maybe a custom post type that you could schedule in one blog that automatically pushes to each of the blogs individually (that then just outputs some code), but I was having some difficulty wrapping my head around the problem.

    All it would need to do is present static data like “Schools Closed Today: <?php echo date ?> on a date that could be set (or, even an “on/off switch”)

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    http://pippinsplugins.com/admin-notices-in-the-network-admin/ describes that.

    I don’t know if anyone plugin’d it yet besides this: https://premium.wpmudev.org/project/admin-message/

    It’s free, btu you have to sign up first.

    Thread Starter stirltech

    (@stirltech)

    @ipstenu I’ve come across a couple plugins that push notices to all the Dashboards of the network sites, however we are looking for something that can push a notice on the front end of the sites, so non-logged-in visitors can see it. Any idea on what might do that?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Oh! You didn’t say front end, sorry 🙂

    You can do that via an mu-plugin, hook into wp_header() and output as needed, though there would be a LOT of jiggering to make sure it looks like right all the themes. Be sort of like a network pop-up/slide-up.

    Code it so the content is pulled from a network option, so only the network admin can edit it on wp-admin/network and that would do it.

    Thread Starter stirltech

    (@stirltech)

    @ipstenu

    Pardon my ignorance – I’m very quick to learn but sometimes need a little guidance. Do you have any resources that I could use to develop such a plugin? I understand the basics of coding a plugin but am more unsure on how to “pull it from a network option” and don’t know where to look to find something like that. Any ideas?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The basic concept is the same as this: http://wpmututorials.com/plugins/networkwide-menu/

    So in that case, they’re pulling a menu from the main site.

    You would want to

    1) Create a network-only option for the content.

    2) Have your plugin pull that it and tack it on to wp_head()

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Network Wide Notification/Alert By Date’ is closed to new replies.