Different custom footer for one site in multisite

Community Forums Forums General Discussion Different custom footer for one site in multisite

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  jprusins 3 months, 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #103868

    jprusins
    Member
    Post count: 4

    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.org
    #103875

    Lauren @ OnceCoupled
    Member
    Post count: 591

    Use a conditional to test for blog id, then change the footer accordingly. :)

    Best,
    Lauren


    I do custom WordPress work! http://oncecoupled.com
    Contact me directly: lauren@oncecoupled.com

    #103877

    jprusins
    Member
    Post count: 4

    Thanks 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.

    #103881

    Lauren @ OnceCoupled
    Member
    Post count: 591

    Yeah, 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!


    I do custom WordPress work! http://oncecoupled.com
    Contact me directly: lauren@oncecoupled.com

    #104084

    jprusins
    Member
    Post count: 4

    Thanks 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!!

    #105164

    jprusins
    Member
    Post count: 4

    For 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!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.