Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 91 lines (57 sloc) 2.983 kb
789a1c8 @samikeijonen Commit all files.
authored
1 <?php
2 /**
12e031f @samikeijonen Page templates.
authored
3 * Template Name: Most Popular by comments
4 *
5 * Displays most popular posts by comments.
789a1c8 @samikeijonen Commit all files.
authored
6 *
7 * @package Path
8 * @subpackage Template
9 * @since 0.1.0
10 */
11
12 get_header(); // Loads the header.php template. ?>
13
14 <?php do_atomic( 'before_content' ); // path_before_content ?>
15
16 <div id="content">
17
18 <?php do_atomic( 'open_content' ); // path_open_content ?>
19
20 <div class="hfeed">
21
22 <?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template. ?>
23
24 <?php
25
12e031f @samikeijonen Page templates.
authored
26 /* Loop for most commented articles. entry-views extension is used. */
789a1c8 @samikeijonen Commit all files.
authored
27
28 $args = array (
29 'ignore_sticky_posts' => true,
12e031f @samikeijonen Page templates.
authored
30 'orderby' => 'comment_count',
789a1c8 @samikeijonen Commit all files.
authored
31 'posts_per_page' => get_option( 'posts_per_page' ),
32 'paged' => ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1 )
33 );
34
35 $wp_query = new WP_Query( $args );
36
37 ?>
38
39 <?php if ( $wp_query->have_posts() ) : ?>
40
41 <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
42
43 <?php do_atomic( 'before_entry' ); // path_before_entry ?>
44
847cbe0 Some markup changes.
Sami Keijonen authored
45 <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
a9a2c51 @samikeijonen More page templates. Tag Cloud and archive page.
authored
46
47 <?php do_atomic( 'open_entry' ); // path_open_entry ?>
789a1c8 @samikeijonen Commit all files.
authored
48
c09c406 Lot's of small changes in slider page template and in thumbnails sizes.
Sami Keijonen authored
49 <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) );?>
789a1c8 @samikeijonen Commit all files.
authored
50
847cbe0 Some markup changes.
Sami Keijonen authored
51 <header class="entry-header">
52 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
b24eec0 @samikeijonen Hybrid Core updated to 1.4.2
authored
53 <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( 'Published by [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'path' ) . '</div>' ); ?>
847cbe0 Some markup changes.
Sami Keijonen authored
54 </header><!-- .entry-header -->
789a1c8 @samikeijonen Commit all files.
authored
55
56 <div class="entry-summary">
57 <?php the_excerpt(); ?>
58 <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'path' ), 'after' => '</p>' ) ); ?>
59 </div><!-- .entry-summary -->
60
847cbe0 Some markup changes.
Sami Keijonen authored
61 <footer class="entry-footer">
62 <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( 'Views [entry-views] [entry-terms taxonomy="category" before="Posted in "] [entry-terms before="Tagged "]', 'path' ) . '</div>' ); ?>
63 </footer><!-- .entry-footer -->
789a1c8 @samikeijonen Commit all files.
authored
64
65 <?php do_atomic( 'close_entry' ); // path_close_entry ?>
66
847cbe0 Some markup changes.
Sami Keijonen authored
67 </article><!-- .hentry -->
789a1c8 @samikeijonen Commit all files.
authored
68
69 <?php do_atomic( 'after_entry' ); // path_after_entry ?>
70
71 <?php endwhile; ?>
72
73 <?php else : ?>
74
75 <?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
76
77 <?php endif; ?>
78
79 </div><!-- .hfeed -->
80
81 <?php do_atomic( 'close_content' ); // path_close_content ?>
82
83 <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
84
85 <?php wp_reset_postdata(); // Reset Query ?>
86
87 </div><!-- #content -->
88
89 <?php do_atomic( 'after_content' ); // path_after_content ?>
90
91 <?php get_footer(); // Loads the footer.php template. ?>
Something went wrong with that request. Please try again.