I am using the 'custom footer content' module

Hi,

I am using the 'custom footer content' module of the 'ultimate branding' plugin on my wordpress network in order to display a link to the main site on every created subsite.

But the 'custom footer content' is also added to all of my main site pages.

Is there a way to avoid this ?

  • Alexander

    Hi @botta,

    Right now this isn't possible, but I will move this to feature requests so it can be considered for a future release. It would indeed be nice to have an option to omit the main site.

    For now, there are a few workarounds.

    First, in the custom content you could wrap it in a DIV with a custom class.

    <div class="class-name">Your custom footer content as usual :)</div>

    Then on your main site you could add some CSS to hide that div:
    .class-name { display:none}
    This CSS could simply be added in the theme, or within a plugin that allows for custom CSS styles.

    Another option would be to edit the plugin. You can go to global-footer-content.php in the ultimate branding folder. On line 41, you can just test if you're on the main site first by changing the code to look like this:

    if(is_main_site()){ add_action('wp_footer', array(&$this, 'global_footer_content_output')); }

    Best regards

  • Boyington

    Thank you for these good workarounds.

    I really find the CSS solution the nicest because it won't be lost on the next plugin upgrade.

    However, I found on my side an other working solution. I added the following code to my theme functions.php:

    function botta_remove_global_footer(){
    	global $wp_filter;
    	$hook=$wp_filter["wp_footer"];
    	foreach($hook as $priority => $function){
    	  foreach($function as $name => $properties){
    	  	if(ereg("global_footer_content_output",$name)){
    	  		remove_action('wp_footer', $name);
    	  	}
    	  }
      }
    }
    botta_remove_global_footer();

    thanks again for your help