WordPress.org

Support

Support » Multisite » Ads on Multisite

Ads on Multisite

  • I’d like to put an ad banner across the top of all blogs on my Multisite install, but there doesn’t seem to be a good way to do it. I’ve looked for plugins, etc., but there just doesn’t seem to be anything out there. Any suggestions of where I should put the code?

Viewing 15 replies - 1 through 15 (of 18 total)
  • In the theme?

    I’m assuming it will have to go inside the theme. When it I try to put the code anywhere else it doesn’t show up properly.

    I put mine in widgets, using plain text (or the php widget plugin). Works fine there.

    Where were you trying to put them?

    At the top of the page on a MULTISITE install. I want the ads to show up on ALL sites.

    Sorry I misspoke. By where I meant via what method were you using to put them there?

    HOW were you trying to put them there?

    I’m trying to find a place in the code where it makes sense to put the code. The ideal place would be right under the <body> tag, but there’s no way to do that as the header templates all go past that point in the code. It doesn’t really matter to me where it goes, as long as it shows up when people load the page.

    This is what confused me:

    I’m assuming it will have to go inside the theme. When it I try to put the code anywhere else it doesn’t show up properly.

    Where ELSE outside of the theme were you TRYING to put it that it was failing?

    Anyway. Edit your theme to put it where YOU want it. 🙂 Seriously.

    If your theme has widget sections (like ‘header’ and ‘footer’) you could put the code into a text widget and put it in those sections, but if not then you’ll have to find where, in your theme, you want it, and paste the code in.

    Your missing the point. It’s a MULTISITE install. There are over 1500 blogs on the site. It needs to show up on ALL of them, not just mine. There is no plugin or guidance on this that I can find anywhere. Where do I put the code for the ads? I can’t do it by editing a theme as there are over 100 themes here people can use.

    Actually, and andrea_r might correct me here, but could it be added via the wp_footer (then styled to be positioned where ever you like) via a plugin. I believe multisite still has the ability to run a plugin that affects every site but is only configurable by the main one.

    If you add it directly to a theme you would have to add it to every theme that is available for use but the sub sites. if you only have a handful, then it is relatively easy. Otherwise I would have to suggest the plugin route.

    I’ve actually thought of that. I suppose it is possible, but I’d have to do absolute positioning on the thing and I must say that didn’t work out real well. Also, the wpaminbar pluging does this, and I tried to emulate it, but to no avail, at least so far. It does appear though that wp_footer is the way to go as nothing else is working.

    Well you might need to also include some style into wp_head as well, but yeah a plugin is the route I’d take personally.

    Moderator Andrea Rennick

    @andrea_r

    Actually, and andrea_r might correct me here, but could it be added via the wp_footer (then styled to be positioned where ever you like) via a plugin.

    Yep. that’s basically what you do. yes, it is doable, yes the admin bar plugin is a good place to start. (done it before)

    Or use a theme framework on all the sites that has hooks in places in the header where you want.

    Stop shouting (we’re trying to help, and I didn’t miss the point, thanks).

    Are you using the same theme for all sites? If not, then no matter WHERE you put the ad, it might not work on all sites. You could end up breaking someone’s site down the line.

    On the other hand, if every site has the same theme, or one of a few listed themes, you can still manually edit each one for optimum layout. Gives you more flexibility. 10,000 sites not-withstanding, you may not want the exact same style of ad per site.

    And you never answered “Where ELSE outside of the theme were you TRYING to put it that it was failing?” I didn’t want to retrace steps you’d already done.

    If you do it via a homegrown plugin, put it in the mu-plugins folder. I actually DON’T recommend that, as not every theme will work equally well. If it’s a site where you are always going to control the themes, then sure, it could work, but you’ll have to test each theme to make sure layout is correct.

    Ok, here’s what I got so far: 1. It’s ok to shout, but only AFTER asking someone else not too. 2. There is no possible solution that does not include going through the process of creating a plugin. 3. I’m probably not going to be able to use any of the information I here. I guess I’ll have to figure it out for myself. I’ll let you know how to do this once it’s working.

    I wasn’t shouting either (but you see how it gets misread so easily?)

    Anyway, yeah, it’s a plugin or editing each theme.

    You may want to look at http://wordpress.org/extend/plugins/wordpress-admin-bar/ for how to implement a sitewide sort of ‘bar’.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Ads on Multisite’ is closed to new replies.