-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
90 lines (79 loc) · 2.88 KB
/
footer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/**
* @package WordPress
* @subpackage Gentle
*/
global $page_id;
global $post_type;
global $page;
global $shortname;
$mp_option = gentle_get_global_options();
if(isset($page->ID))
$page_id = $page->ID;
if(isset($mp_option['gentle_sidebar']) && isset($mp_option['gentle_sidebar']['radio_sb_' .$page_id])) {
$sidebar_position = $mp_option['gentle_sidebar']['radio_sb_' .$page_id];
} else {
$sidebar_position = 'right'; }
?>
<script>
jQuery(document).ready(function($) {
<?php if($mp_option['gentle_footer_visible'] == "0") {?>
$('#gentle_footer').children('.footer-content').slideUp(1);
$('#gentle_footer').children('.bottom-footer').css('border', 'none');
<?php } ?>
<?php if($mp_option['gentle_footer_animated'] == "1") {?>
$('#gentle_footer').hover(function() {
var $this = $(this).children('.footer-content');
$this.stop().slideDown();
$('html, body').stop().animate({ scrollTop: $(document).height() });
$('#gentle_footer').children('.bottom-footer').css('border-top', '1px solid #DDD');
}, function() {
var $this = $(this).children('.footer-content');
$this.stop().slideUp('slow', function(){
$('#gentle_footer').children('.bottom-footer').css('border', 'none');
});
});
<?php } ?>
});
</script>
<footer id="gentle_footer" class="sidebar-<?php echo $sidebar_position; ?>">
<div class="footer-content">
<ul>
<?php
if(isset($mp_option['gentle_sidebar']) && isset($mp_option['gentle_sidebar']['footer_' .$page_id]))
$custom_sb = $mp_option['gentle_sidebar']['footer_' .$page_id];
else
$custom_sb = "off";
$custom_sb_id = get_the_title($page_id).' Footer';
if($custom_sb == 'on' && dynamic_sidebar($custom_sb_id) ) {
// displays custom footer
} elseif(dynamic_sidebar('Main Footer') ) {
// displays regular footer when there are no widgets in custom Footer
} else {
// displays widgets when they are not specified in custom & Main Footer
?>
<li class="widget widget_3">
<h2 class="widget_title footer_title">About</h2>
<div class="textwidget">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis leo at mauris faucibus suscipit. Sed orci arcu, tincidunt at commodo in, consectetur sed enim. Vestibulum aliquet justo rutrum magna tincidunt fringilla. In eget nisl in justo mattis accumsan eu nec magna. Pellentesque pellentesque pharetra lacus, eget aliquet mi mattis eu.
</div>
</li>
<li class="widget widget_3"><h2 class="widget_title footer_title">Categories</h2>
<ul>
<?php wp_list_categories('show_count=1&title_li='); ?>
</ul>
</li>
<li class="widget widget_3"><h2 class="widget_title sidebar_widget_title">Archives</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<?php
}?>
</ul>
</div>
</div>
</footer><!-- gentle footer end -->
</div><!-- #page end -->
<?php wp_footer(); ?>
</body>
</html>