-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsidebar-content.php
61 lines (44 loc) · 1.55 KB
/
sidebar-content.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
<?php
/**
* Sidebar display content - a template part inside sidebar.php
* Used when file 'sidebar-content-{location}.php' doesn't exist in this child theme.
* - Using additional 'sidebar-content-{location}.php' examples (see documentation for all):
* sidebar-content-page.php
* sidebar-content-single.php
* sidebar-content-404.php
* @package Girder child theme for Wonderflux framework
*/
?>
<div class="sidebar-box">
<h4 class="sidebar-title">Pages</h4>
<ul>
<?php wp_list_pages('title_li=' ); ?>
</ul>
</div>
<div class="sidebar-box">
<h4 class="sidebar-title">Categories</h4>
<form id="category-select" class="category-select" action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get">
<?php
$args = array(
'show_option_none' => esc_html__( 'Select category', 'wfx-girder' ),
'show_count' => 1,
'orderby' => 'name',
'echo' => 0,
);
$select = wp_dropdown_categories( $args );
$replace = "<select$1 onchange='return this.form.submit()'>";
$select = preg_replace( '#<select([^>]*)>#', $replace, $select );
echo $select;
?>
<noscript>
<input type="submit" value="View" />
</noscript>
</form>
</div>
<div class="sidebar-box">
<h4 class="sidebar-title">Archives</h4>
<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value=""><?php echo esc_attr__( 'Select Month', 'wfx_girder' ); ?></option>
<?php wp_get_archives( array( 'type' => 'monthly', 'format' => 'option', 'show_post_count' => 1 ) ); ?>
</select>
</div>