bonnix

custom footer child theme

Mar 21st, 2023 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. <?php
  2. /**
  3. * Footer Template
  4. *
  5. * @version 3.2.5
  6. */
  7.  
  8. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  9. ?>
  10. <footer id="containerfooter" class="footerclass" itemscope itemtype="https://schema.org/WPFooter">
  11. <div class="container">
  12. <div class="row">
  13. <?php global $virtue; if(isset($virtue['footer_layout'])) { $footer_layout = $virtue['footer_layout']; } else { $footer_layout = 'fourc'; }
  14. if ($footer_layout == "fourc") {
  15. if (is_active_sidebar('footer_1') ) { ?>
  16. <div class="col-md-3 col-sm-6 footercol1">
  17. <?php dynamic_sidebar('footer_1'); ?>
  18. </div>
  19. <?php }; ?>
  20. <?php if (is_active_sidebar('footer_2') ) { ?>
  21. <div class="col-md-3 col-sm-6 footercol2">
  22. <?php dynamic_sidebar('footer_2'); ?>
  23. </div>
  24. <?php }; ?>
  25. <?php if (is_active_sidebar('footer_3') ) { ?>
  26. <div class="col-md-3 col-sm-6 footercol3">
  27. <?php dynamic_sidebar('footer_3'); ?>
  28. </div>
  29. <?php }; ?>
  30. <?php if (is_active_sidebar('footer_4') ) { ?>
  31. <div class="col-md-3 col-sm-6 footercol4">
  32. <?php dynamic_sidebar('footer_4'); ?>
  33. </div>
  34. <?php }; ?>
  35. <?php } else if($footer_layout == "threec") {
  36. if (is_active_sidebar('footer_third_1') ) { ?>
  37. <div class="col-md-4 footercol1">
  38. <?php dynamic_sidebar('footer_third_1'); ?>
  39. </div>
  40. <?php }; ?>
  41. <?php if (is_active_sidebar('footer_third_2') ) { ?>
  42. <div class="col-md-4 footercol2">
  43. <?php dynamic_sidebar('footer_third_2'); ?>
  44. </div>
  45. <?php }; ?>
  46. <?php if (is_active_sidebar('footer_third_3') ) { ?>
  47. <div class="col-md-4 footercol3">
  48. <?php dynamic_sidebar('footer_third_3'); ?>
  49. </div>
  50. <?php }; ?>
  51. <?php } else {
  52. if (is_active_sidebar('footer_double_1') ) { ?>
  53. <div class="col-md-6 footercol1">
  54. <?php dynamic_sidebar('footer_double_1'); ?>
  55. </div>
  56. <?php }; ?>
  57. <?php if (is_active_sidebar('footer_double_2') ) { ?>
  58. <div class="col-md-6 footercol2">
  59. <?php dynamic_sidebar('footer_double_2'); ?>
  60. </div>
  61. <?php }; ?>
  62. <?php } ?>
  63. </div>
  64. <div class="footercredits clearfix">
  65.  
  66. <?php if (has_nav_menu('footer_navigation')) :
  67. ?><div class="footernav clearfix"><?php
  68. wp_nav_menu(array('theme_location' => 'footer_navigation', 'menu_class' => 'footermenu'));
  69. ?></div><?php
  70. endif;?>
  71. <p><?php if(isset($virtue['footer_text'])) { $footertext = $virtue['footer_text'];} else {$footertext = '[copyright] [the-year] [site-name] [theme-credit]';}
  72. $footertext = str_replace('[copyright]','&copy;',$footertext);
  73. $footertext = str_replace('[the-year]',date('Y'),$footertext);
  74. $footertext = str_replace('[site-name]',get_bloginfo('name'),$footertext);
  75. $footertext = str_replace('[theme-credit]','- WordPress Theme by <a href="https://www.kadencewp.com/" rel="nofollow" target="_blank">Kadence WP</a>',$footertext);
  76. echo do_shortcode($footertext); ?></p>
  77. </div>
  78. <!-- wp:kadence/advancedheading {"level":5,"uniqueID":"_e74c8d-2c","align":"center"} -->
  79. <h5 id="kt-adv-heading_e74c8d-2c" class="kt-adv-heading_e74c8d-2c wp-block-kadence-advancedheading" style="text-align:center">West Derby Methodist Church, Crosby Green, West Derby, Liverpool, L12 7JZ</h5>
  80. <!-- /wp:kadence/advancedheading -->
  81. </div>
  82. </footer>
  83.  
Advertisement
Add Comment
Please, Sign In to add comment