Community Forums › Forums › Archived Forums › General Discussion › Different custom footer for one site in multisite
Tagged: Custom Footer, multisite
- This topic has 5 replies, 2 voices, and was last updated 10 years, 8 months ago by jprusins.
-
AuthorPosts
-
May 6, 2014 at 12:04 pm #103868jprusinsMember
I manage this multisite installation for a client; I used the code from the "Genesis Footer" help page to build a custom footer for the network of sites. Now the client is asking me to use a different footer on a new site I'm adding to the multisite network, but I'm not sure if there's a way to override the Network custom footer for one subsite. I'm using the Lifestyle Pro child theme.
That sounds to me like a question for Tech Support, but Tech Support informs me that it's a "theme customization" question which they won't help me with; anyone here have any ideas?
Thanks!
http://tergar.orgMay 6, 2014 at 12:29 pm #103875Lauren @ OnceCoupledMemberUse a conditional to test for blog id, then change the footer accordingly. 🙂
Best,
Lauren
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
May 6, 2014 at 12:32 pm #103877jprusinsMemberThanks Lauren, that sounds like what I would want to do, but knowing how to do it is a bit above my pay grade! So should I set the conditional (I guess I can look up the syntax for that?) in the footer section of functions.php? I'm more of a cut&paste coder than a real one, so I need more info to start with!
thx,
John.May 6, 2014 at 12:44 pm #103881Lauren @ OnceCoupledMemberYeah, use a conditional like
global $blog_id; if ($blog_id == 2) { code here; }
within your footer function, after the original, so that it's only overwritten for this one site.
Good luck!
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
May 7, 2014 at 2:53 pm #104084jprusinsMemberThanks for the additional help... I'm getting closer! Still not quite there, though... here's what I have:
//*Custom Footer remove_action( 'genesis_footer', 'genesis_do_footer' ); add_action( 'genesis_footer', 'sp_custom_footer' ); function sp_custom_footer() { ?>
followed by an html div that contains the footer content. After the closing div tag I put your code:
global $blog_id; if ($blog_id == 7) {
followed by a div that contains the footer content that I only want to show on blog ID#7. That is then followed by
} <?php }
which is the code that followed the original (working) div, preceded by the closing bracket from your code.
This all works well, except that I now have both footers on all sites in the multisite setup, instead of the second footer only appearing on blog ID#7.
Any ideas? Thanks!!
May 14, 2014 at 3:55 pm #105164jprusinsMemberFor anyone else that may be looking for an answer to this issue, I found a very simple solution (after not finding a way to successfully implement the code Lauren suggested above): Studiopress offers a very useful plugin called "Genesis Simple Edits" that easily enables custom footers. I simply network activated the plugin, then put the code for the appropriate footer on each site, and in ten minutes I was done. No need to bring out the elephant gun to kill the mosquito!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.