How to apply Branding "Global Footer Content" ONLY to sub-sites (not to the main top-level

Hi there!
I'd like to apply the Ultimate Branding "Global Footer Content" ONLY to sub-sites (not to the main top-level blog). How can I do that?
To clarify, this would be like the Branding -> "Footer Content" page had a checkbox under "Global Footer Content" that said "don't apply this to top level site".
The reason for this: the top-level site is usually the sales/marketing site, so it's different from the sub-sites (i.e. the network of customer blogs), and might need different JS calls, etc. i.e. edublogs.org would likely have different header/footer calls than the customer blogs in the network.
Thanks!

  • Vaughan
    • Support/SLS MockingJay

    hiya

    currently this isn't possible, however it is a good feature to add so i will add this to the feature requests.

    in the meantime, you might be able to do this with a little custom coding.

    open up ultimate-branding-files/modules/global-footer-content.php

    find this function.

    function global_footer_content_output() {
    		$global_footer_content = ub_get_option('global_footer_content');
    		if ( $global_footer_content == 'empty' ) {
    			$global_footer_content = '';
    		}
    		if ( !empty( $global_footer_content ) ) {
    			echo stripslashes( $global_footer_content );
    		}
    	}

    replace with

    function global_footer_content_output() {
    		$global_footer_content = ub_get_option('global_footer_content');
    		if ( $global_footer_content == 'empty' || is_main_site()) {
    			$global_footer_content = '';
    		}
    		if ( !empty( $global_footer_content ) ) {
    			echo stripslashes( $global_footer_content );
    		}
    	}

    hope this helps.

  • Jennifer
    • The Incredible Code Injector

    Hey Vaughan! Thanks for the super fast reply, will try that and confirm.

    Very glad to hear you're adding this to the feature requests list. :slight_smile:

    Thinking it through further, I'm wondering which is more useful....
    1.) adding a checkbox below "global footer content" textarea for "apply only to network blogs, not top level site"...
    2.) or just adding a 2nd textarea to Global Footer Content... and making 1 be "ONLY for network blogs" and the other be "ONLY for the top level blog"

    I think #2 may provide more flexibility and more function as well... that way could set script calls for the main blog AND for network blogs in same place.

    Thanks!

  • Vaughan
    • Support/SLS MockingJay

    Hiya

    I've added this to the feature requests, however i can't guarantee it'll make it into the next release. if that's the case, then to be safe make a note of this change as when you update the plugin this change will be lost, so you will need to add this change again.

    hope this helps.

    thanks.

  • Jennifer
    • The Incredible Code Injector

    Great, thank so much Vaughan.

    Could you please request they also add a matching text entry box for content in the <head> section of network blogs.

    We use StudioPress themes, and one of the things I love about them is their theme setting section with 2 text boxes: to be added before </head> and to be added before </body> - See screenshot: http://www.screencast.com/t/2L6eXPQW0

    Just want to add that this Global Footer feature is very useful, especially if you have a network of hundreds of blogs. This way it's very easy to add or remove code to show on all of them without worrying about updating code and re-uploading some plugin which is far more error-prone and risky with a large blog network.

    It would be extremely useful to see the same functionality for the header section. :slight_smile:

    Thanks!

  • Alexander
    • DEV MAN’s Mascot

    Hi @Jennifer,

    Just wanted to followup here after seeing you post on another thread. Great to see we were able to include a global header feature per your other request.

    As this thread is in feature requests, it can be considered for future development, but we can't promise anything will be included, or give any ETAs.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.