Repository navigation
Expand file tree
/
Copy pathsidebar.php
More file actions
60 lines (40 loc) · 1.86 KB
/
Copy pathsidebar.php
File metadata and controls
60 lines (40 loc) · 1.86 KB
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
<div class="large-12 columns hide-on-phones">
<!-- TIME FOR TABS!!! -->
<div class="section-container tabs" data-section="tabs">
<section class="section">
<p class="title"><a href="#">Popular</a></p>
<div class="content">
<ul class="no-bullet">
<?php
$popularpost = new WP_Query( array( 'posts_per_page' => 5, 'meta_key' => 'wpb_post_views_count', 'orderby' => 'wpb_post_views_count', 'order' => 'DESC' ) );
while ( $popularpost->have_posts() ) : $popularpost->the_post();
echo '<a href="' . get_permalink() . '"><li>' . get_the_title() . '</li></a>';
endwhile;
wp_reset_postdata();
?>
</ul>
</div>
</section>
<section class="section">
<p class="title more"><a href="#">More</a></p>
<div class="content">
<p>Coming soon!</p>
<!--
<?php if ( is_single() ) { ?>
<?php echo '<div>' . popular_posts_per_category() . '</div>'; ?>
<?php } elseif ( is_search() ) { ?>
<h5 class="subheader">All Archives</h5>
<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option>
<?php wp_get_archives( array( 'type' => 'monthly', 'format' => 'option', 'show_post_count' => 1 ) ); ?>
</select>
<?php } elseif (function_exists('vote_poll') && !in_pollarchive()) { ?>
<?php echo get_poll(); ?>
<?php } else { ?>
<?php echo 'Nothing to display.'; ?>
<?php } wp_reset_postdata(); ?>
-->
</div>
</section>
</div>
</div>