Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding footer to subdomains outside WPMU/BP?

  • I have a site setup like this:

    http://www.site.com

    sub1.site.com

    sub2.site.com

    sub3.site.com

    WPMU/BP is on www. and sub1 sub2 and sub3 aren’t even related to WP, just hard coded static php pages

    Now, my problem is like this: in WP, to include something like a footer/ sidebar/whatever outside WP, I just added include wp-blog-header.php and I was a happy camper. Now, with subdomains, this approach is not working. I’m trying to have the footer from WPMU/BP across all subdomains, but when including wp-blog-header.php, the only way it works is with internal links (like home/domains/mydomain/public_html/wp-blog-header.php). Well, in fact it doesn’t work, it just doesn’t give me an error message, but it redirects me to my blog. So, what’s the proper way to include a footer across all my subdomains?

    Thanx in advance :)

Viewing 5 replies - 1 through 5 (of 5 total)
  • any ideas? :(


    Xevo
    Participant

    @xevo

    I’m guessing sub1 etc. are blogs? Than it’s easy, just add the same footer across the sites through the template?

    no, they’re not blogs, they’re subdomains using other scripts in which I’d like to add the BP footer to reflect the latest posts, activity and such. That itself isn’t a problem in WP, but I don’t know if it’s because of WPMU, BP or the server configuration, but I cannot make it work at all in this specific site. I did a search on Google and it seems many people is having trouble with this on BP context, so I guess it will be easier to get the answer her


    pcwriter
    Participant

    @pcwriter

    @cocomozlo

    Have you seen Brajesh’s Sitewide Footer Content plugin? It’s a premium plugin fromBuddyDev.com so you have to sign up to get it, but he’s got a lot of goodies there which make the $30 (for 3 months) a pretty good investment.

    http://buddydev.com/plugins/buddypress-premium-plugins/sitewide-footer-content-plugin-for-wpmubuddypress/

    I use it on my network (with subdirectories mind you) but know of others who use it with subdomains with no problem reported.

    Hope this helps! :-)


    Boone Gorges
    Keymaster

    @boonebgorges

    @cocomozlo – If you just want static content in the footer – site information, credits, privacy notice, etc – your best bet is to copy the HTML produced by BuddyPress, put it into its own file, and then require it in your subdomains with a normal PHP require statement.

    If you want dynamic information (latest posts, activity, etc) it’s going to be trickier. Those widgets are populated dynamically by WordPress, and so require WordPress to be loaded. The easiest way to make it work would be to load WP/BP in the background of your subdomains and then use the footer PHP provided by BP. You can start WP by requiring wp-load.php in the root of your WP directory.

    Requiring WP on every page load is pretty intensive, though, especially if you’re running another CMS altogether on other subdomains. It’d be good to avoid it. A possible method: Write a BP function that writes the footer to a static file and refreshes it periodically, then include that html page in your subdomains. See http://blog.slaven.net.au/archives/2007/02/01/timing-is-everything-scheduling-in-wordpress/ for more on scheduling events (like a cache) in WP; check out a plugin like https://wordpress.org/extend/plugins/wp-cache/ for an example of WP caching in action.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding footer to subdomains outside WPMU/BP?’ is closed to new replies.
Skip to toolbar