-
Notifications
You must be signed in to change notification settings - Fork 53
/
footer.php
executable file
·66 lines (61 loc) · 2.15 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
<?php
// If Single or Archive (Category, Tag, Author or a Date based page).
if ( is_single() || is_archive() ) :
?>
</div><!-- /.col -->
<?php
get_sidebar();
?>
</div><!-- /.row -->
<?php
endif;
?>
</main><!-- /#main -->
<footer id="footer">
<div class="container">
<div class="row">
<div class="col-md-6">
<p><?php printf( esc_html__( '© %1$s %2$s. All rights reserved.', 'my-theme' ), wp_date( 'Y' ), get_bloginfo( 'name', 'display' ) ); ?></p>
</div>
<?php
if ( has_nav_menu( 'footer-menu' ) ) : // See function register_nav_menus() in functions.php
/*
Loading WordPress Custom Menu (theme_location) ... remove <div> <ul> containers and show only <li> items!!!
Menu name taken from functions.php!!! ... register_nav_menu( 'footer-menu', 'Footer Menu' );
!!! IMPORTANT: After adding all pages to the menu, don't forget to assign this menu to the Footer menu of "Theme locations" /wp-admin/nav-menus.php (on left side) ... Otherwise the themes will not know, which menu to use!!!
*/
wp_nav_menu(
array(
'container' => 'nav',
'container_class' => 'col-md-6',
//'fallback_cb' => 'WP_Bootstrap4_Navwalker_Footer::fallback',
'walker' => new WP_Bootstrap4_Navwalker_Footer(),
'theme_location' => 'footer-menu',
'items_wrap' => '<ul class="menu nav justify-content-end">%3$s</ul>',
)
);
endif;
if ( is_active_sidebar( 'third_widget_area' ) ) :
?>
<div class="col-md-12">
<?php
dynamic_sidebar( 'third_widget_area' );
if ( current_user_can( 'manage_options' ) ) :
?>
<span class="edit-link"><a href="<?php echo esc_url( admin_url( 'widgets.php' ) ); ?>" class="badge bg-secondary"><?php esc_html_e( 'Edit', 'my-theme' ); ?></a></span><!-- Show Edit Widget link -->
<?php
endif;
?>
</div>
<?php
endif;
?>
</div><!-- /.row -->
</div><!-- /.container -->
</footer><!-- /#footer -->
</div><!-- /#wrapper -->
<?php
wp_footer();
?>
</body>
</html>