Advertisement
jan_dembowski

Great Child functions.php

Oct 17th, 2015
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.11 KB | None | 0 0
  1. <?php
  2.  
  3. add_action( 'wp_enqueue_scripts', 'mh_great_child_style' , 5 );
  4.  
  5. function mh_great_child_style() {
  6.     wp_enqueue_style( 'great-parent-style', get_template_directory_uri() . '/style.css' );
  7. }
  8.  
  9. function great_child_wp_footer () { ?>
  10.     </div><!-- #content -->
  11.     <?php
  12.     //  Footer Widgets
  13.     $s = array('footer-left','footer-center','footer-right');
  14.     // Is Active?
  15.     $active = array();
  16.     foreach ( $s as $i )
  17.         if ( is_active_sidebar($i) ) $active [] = $i;
  18.     ?>
  19.    
  20.    
  21.     <?php if ( is_active_sidebar( 'left-sidebar' ) ) : ?>
  22.         <ul id="sidebar"><?php dynamic_sidebar( 'left-sidebar' ); ?></ul>
  23.     <?php endif; ?>
  24.    
  25.     <footer id="colophon" class="site-footer" role="contentinfo">
  26.         <!-- Footer Quotation -->
  27.         <?php great_footer_quote ();?>
  28.         <div class="clear"></div>
  29.         <!-- Footer Widgets -->
  30.         <?php
  31.         // Count Actives
  32.         if ( count ($active) ) {
  33.             $width = round ( 100 / count ($active) , 2 ) - 2; // -2 : for margins
  34.             foreach ( $active as $activ ) {
  35.                 ?>
  36.                 <div style="width:<?php echo $width;?>%;" class="footer-widget"><?php dynamic_sidebar( $activ ); ?></div>
  37.                 <?php
  38.             }
  39.         }
  40.         ?>
  41.         <div class="clear"></div>
  42.        
  43.         <!-- Site Contact -->
  44.         <?php great_site_contact( "footer" );?>
  45.         <div class="clear"></div>
  46.        
  47.         <!-- Footer SM -->
  48.         <?php great_social_media( "footer" );?>
  49.         <div class="clear"></div>
  50.  
  51. <div class="site-info"><?php printf( __( 'Copyright &copy; %1$d %2$s.','great' ),date('Y'),'<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" ><span>' . get_bloginfo( 'name', 'display' ) . '</span></a>');?> <?php _e( 'Powered by WordPress', 'great' ); ?>
  52.  
  53. <span class="sep"> &amp; </span>Copyright © 2015 Perfect Finish Painting. Powered by WordPress & Designer: Nicole Dudding,<a href="yourpageyoursite.com.au">yourpageyoursite.com.au</a>
  54.  
  55.  
  56.        
  57.         </div><!-- .site-info -->
  58.     </footer><!-- #colophon -->
  59.    
  60.     <div id="back_top"><i class="fa fa-angle-up"></i></div>
  61. </div><!-- #page -->
  62. <?php
  63. } // end of great_wp_footer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement