Advertisement
DLRT

WordPress Theme Development

Sep 14th, 2016
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. <?php
  2.  
  3. // dlrt-config.php
  4.  
  5. $fields = array(
  6.     'id'       => 'dlrt-hide-top-footer',
  7.     'type'     => 'button_set',
  8.     'title'    => __('Show/Hide Top Footer', 'dlrt-redux'),
  9.     'subtitle' => __('Show or hide the top footer area.', 'dlrt-redux'),
  10.     'desc'     => __('', 'dlrt-redux'),
  11.     //Must provide key => value pairs for options
  12.     'options' => array(
  13.         '1' => 'Show',
  14.         '2' => 'Hide'
  15.      ),
  16.     'default' => '1'
  17. ),
  18.  
  19. // footer.php
  20.  
  21. if( !is_object($post) ) {
  22.     if($dlrt_redux['dlrt-hide-top-footer'] == 1) { ?>    
  23.     <section id="top-footer">
  24.         <div class="footer-widgets pure-g limiter">
  25.             <?php include(get_template_directory() . '/elements/footer-widgets.php') /*Include footer widgets*/ ;?>
  26.         </div>
  27.     </section>
  28.    
  29. <?php } } elseif($dlrt_redux['dlrt-hide-top-footer'] == 1) {
  30.     if ( 2 == (get_post_meta( $post->ID, 'dlrt_disable_footerwidgets', true )) ) { ?>    
  31.     <section id="top-footer">
  32.         <div class="footer-widgets pure-g limiter">
  33.             <?php include(get_template_directory() . '/elements/footer-widgets.php') /*Include footer widgets*/ ;?>
  34.         </div>
  35.     </section>
  36. <?php } } ?>
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement