Example #1
0
<?php

/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after
 *
 * @package oxford
 */
?>
	<div class="clear"></div>

	<section class="footer-widgets<?php 
if (oxford_has_footer_widgets()) {
    echo ' has-widgets';
}
?>
">
		<?php 
if (is_home() || is_archive()) {
    ?>
		<div id="mobile-extra-widget" class="widget-area">
			<?php 
    get_template_part('content', 'extra');
    ?>
		</div>
		<?php 
}
?>
		<?php 
oxford_maybe_show_footer_widgets();
Example #2
0
 /**
  * Review relevant theme options before showing the footer widgets
  *
  * @since 1.0.
  *
  */
 function oxford_maybe_show_footer_widgets()
 {
     // Pages
     if (!oxford_is_wpcom() && get_theme_mod('footer-widgets-hide-on-pages') && is_page()) {
         return;
     }
     // Posts
     if (!oxford_is_wpcom() && get_theme_mod('footer-widgets-hide-on-posts') && is_single()) {
         return;
     }
     // Blog/Archives
     if (!oxford_is_wpcom() && get_theme_mod('footer-widgets-hide-on-archives') && (is_home() || is_archive() || is_search())) {
         return;
     }
     // All sidebars are empty
     if (!oxford_has_footer_widgets()) {
         return;
     }
     // Still here? Show the footer widgets
     get_sidebar('footer-1');
     get_sidebar('footer-2');
     get_sidebar('footer-3');
 }