Title: use the plugin way
Last modified: August 21, 2016

---

# use the plugin way

 *  [beezeeking](https://wordpress.org/support/users/beezeeking/)
 * (@beezeeking)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/use-the-plugin-way/)
 * how can i add the code?my theme code is
 *     ```
       <?php
       	global $wp_query, $paged;
       	if( get_query_var( 'paged' ) ) {
       		$paged = get_query_var( 'paged' );
       	}
       	elseif( get_query_var( 'page' ) ) {
       		$paged = get_query_var( 'page' );
       	}
       	else {
       		$paged = 1;
       	}
       	$blog_query = new WP_Query( array( 'post_type' => 'post', 'paged' => $paged ) );
       	$temp_query = $wp_query;
       	$wp_query = null;
       	$wp_query = $blog_query;
   
       	if ( $blog_query->have_posts() ) :
   
       			while ( $blog_query->have_posts() ) : $blog_query->the_post();
       				?>
       ```
   
 * [http://wordpress.org/extend/plugins/filter-by-comments/](http://wordpress.org/extend/plugins/filter-by-comments/)

The topic ‘use the plugin way’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/filter-by-comments.svg)
 * [Filter By Comments](https://wordpress.org/plugins/filter-by-comments/)
 * [Support Threads](https://wordpress.org/support/plugin/filter-by-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/filter-by-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/filter-by-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/filter-by-comments/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [beezeeking](https://wordpress.org/support/users/beezeeking/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/use-the-plugin-way/)
 * Status: not resolved