forked from UCF/Main-Site-Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-left.php
59 lines (49 loc) · 1.85 KB
/
sidebar-left.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
<?php disallow_direct_load('sidebar-left.php');?>
<?php if(!function_exists('dynamic_sidebar') or !dynamic_sidebar('Left Sidebar')):?>
<?php endif;?>
<!-- Hard-written sidebar components go here: -->
<?php
$more_info_nav_val = get_post_meta($post->ID, 'page_widget_l_moreinfo', TRUE);
$more_info_nav_val_title = get_post_meta($post->ID, 'page_widget_l_moreinfo_title', TRUE);
$secondary_nav_val = get_post_meta($post->ID, 'page_widget_l_secinfo', TRUE);
$secondary_nav_val_title = get_post_meta($post->ID, 'page_widget_l_secinfo_title', TRUE);
$show_colleges_val = get_post_meta($post->ID, 'page_widget_l_showcolleges', TRUE);
if ($more_info_nav_val) {
$moreinfo_title = $more_info_nav_val_title !== '' ? $more_info_nav_val_title : 'More Information';
print '<h3 id="sidebar_l_moreinfo" class="sidebar_title">'.$moreinfo_title.':</h3>';
$args = array(
'menu' => $more_info_nav_val,
'container' => 'false',
'menu_class' => 'sidebar_nav list-unstyled',
'before' => '<strong>',
'after' => '</strong>'
);
wp_nav_menu($args);
}
if ($secondary_nav_val) {
$nav_title = $secondary_nav_val_title !== '' ? $secondary_nav_val_title : 'Useful Links';
print '<h3 id="sidebar_l_secinfo" class="sidebar_title">'.$nav_title.':</h3>';
$args = array(
'menu' => $secondary_nav_val,
'container' => 'false',
'menu_class' => 'sidebar_nav list-unstyled',
'before' => '<strong>',
'after' => '</strong>'
);
wp_nav_menu($args);
}
if ($show_colleges_val) {
echo sprintf(
'<h3 id="sidebar_l_colleges" class="sidebar_title%s">UCF Colleges</h3>',
($more_info_nav_val || $secondary_nav_val ? '' : ' notoppad')
);
$args = array(
'theme_location' => 'ucf-colleges',
'container' => 'false',
'menu_class' => 'sidebar_nav list-unstyled',
'before' => '<strong>',
'after' => '</strong>'
);
wp_nav_menu($args);
}
?>