-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
81 lines (60 loc) · 2.68 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
<footer class="footer" role="contentinfo" itemscope itemtype="http://schema.org/WPFooter">
<div id="inner-footer" class="wrap cf">
<?php /* Uncomment this and the 'Footer Links' menu registration in template.php to use.
Or delete it if you're not using it.
<nav role="navigation">
wp_nav_menu(array(
'container' => 'div', // enter '' to remove nav container (just make sure .footer-links in _base.scss isn't wrapping)
'container_class' => 'footer-links cf', // class of container (should you choose to use it)
'menu' => __( 'Footer Links', 'templatetheme' ), // nav name
'menu_class' => 'nav footer-nav cf', // adding custom nav class
'theme_location' => 'footer-links', // where it's located in the theme
'before' => '', // before the menu
'after' => '', // after the menu
'link_before' => '', // before each link
'link_after' => '', // after each link
'depth' => 0, // limit the depth of the nav
'fallback_cb' => 'bones_footer_links_fallback' // fallback function
));
</nav>
*/ ?>
<p class="source-org copyright">© <?php echo date('Y'); ?> <?php bloginfo( 'name' ); ?></p>
</div>
<script type="text/javascript">
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
</script>
<script type="text/javascript">
$(window).scroll(function() {
if ($(this).scrollTop() > 1){
$('header').addClass("sticky");
}
else{
$('header').removeClass("sticky");
}
});
</script>
</footer>
</div>
<?php // all js scripts are loaded in library/bones.php ?>
<?php wp_footer(); ?>
</body>
</html> <!-- This is the end. My only friend. -->