Title: WordPress custom loop and Gzip compression error
Last modified: August 21, 2016

---

# WordPress custom loop and Gzip compression error

 *  [sahilsaid](https://wordpress.org/support/users/sahilsaid/)
 * (@sahilsaid)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-custom-loop-and-gzip-compression-error/)
 * Hi,
 * I have this strange problem with the custom post loop I have in one of my custom
   page template. The browser is throwing a compression error. Error screenshot:
   [http://i40.tinypic.com/zy8pk7.png](http://i40.tinypic.com/zy8pk7.png)
 * I have also enabled my Gzip compression on the blog.
 * The code which is causing the problem is this:
 *     ```
       <?php
       /* Template Name: Custom Blog
        */
   
       get_header();
       ?>
       <div class="pagenev"><div class="conwidth"><?php design_breadcrumbs() ?></div></div>
       <div id="container">
           <div id="content">
   
               <?php
               $args = array('cat' => 18, 'showposts' => 5);
   
               query_posts($args);
   
               if (have_posts()) : while (have_posts()) : the_post();
                       ?>
   
                       <!-- Blog Entry -->
                       <div class="blog_entry">
                           <!-- Inside -->
                           <div class="inside">
   
                               <h2 class="post-title"><a>"><?php the_title(); ?></a></h2>
                               <div class="date"><?php the_time('F l, Y'); ?> at <?php the_time('g:i a'); ?> </div>
                               <div class="comments">Comments: <?php echo get_comments_number(); ?></div>
                               <br class="clear" />
                               <?php
                               $attr = array('class' => "one_col_shadow_img");
                               the_post_thumbnail('blogs', $attr);
                               ?>
                               <p class="biglines"><?php echo get_the_excerpt(); ?></p>
   
                               <br class="clear" />
                           </div>
                           <!-- /Inside -->
                       </div>
                       <!-- /Blog Entry -->
   
                   <?php endwhile; ?>
   
                   <div id="page-nav">
                       <div class="alignleft"><?php previous_posts_link('« Previous Entries') ?></div>
                       <div class="alignright"><?php next_posts_link('Next Entries »', '') ?></div>
                   </div>
               <?php else: ?>
   
                   <h1 class="arc-post-title">Sorry, we couldn't find anything that matched your search.</h1>
   
                   <h3 class="arc-src"><span>You Can Try Another Search...</span></h3>
                   <?php get_search_form(); ?>
                   <p><a>" title="Browse the Home Page">« Or Return to the Home Page</a></p>
   
               <?php
               endif;
               paginator();
               wp_reset_query();
               ?>
   
               <br class="clear" />
   
           </div>
   
       </div>
   
       <?php get_sidebar(); ?>
       <?php get_footer(); ?>
       ```
   
 * Code that is similar but working fine:
 *     ```
       <?php
       /* Template Name: Blog
        */
       get_header();
       ?>
       <div class="pagenev"><div class="conwidth"><?php design_breadcrumbs() ?></div></div>
       <div id="container">
           <div id="content">
   
               <?php
               $args = array('post_type' => 'post', 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ), 'cat' => 18);
               query_posts($args);
   
               if (have_posts()) : while (have_posts()) : the_post();
                       ?>
                       <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                           <h2 class="post-title"><a>"><?php the_title(); ?></a></h2>
                           <div class="posted_on">Posted on: <?php the_date('j F, Y'); ?> </div>
                           <? /* <span class="postmetadata"><h3><?php the_time('F j, Y'); ?></h3><div class="content-ver-sep"> </div><h2>By: <?php the_author_posts_link() ?></h2><h5><?php comments_popup_link('No Comments Yet»', '1 Comment »', '% Comments »'); ?></h5>Posted in <?php the_category(', ') ?><?php the_tags('Tags: ', ', ', ''); ?><h5><?php edit_post_link('Edit This Post'); ?></h5></span> */ ?>
                           <div class="entrytext"><div class="thumb"><?php the_post_thumbnail(); ?></div>
                               <?php add_filter('the_excerpt', 'excerpt_read_more_link'); ?>
                               <div class="clear"> </div>
                           </div>
                           Comments: <?php comments_number('0', '%', '%'); ?> |
                       <a>">Leave comment</a>
                       </div>
                       <div class="content-ver-sep"></div>
                   <?php endwhile; ?>
   
                   <div id="page-nav">
                       <div class="alignleft"><?php previous_posts_link('« Previous Entries') ?></div>
                       <div class="alignright"><?php next_posts_link('Next Entries »', '') ?></div>
                   </div>
   
               <?php else: ?>
   
                   <h1 class="arc-post-title">Sorry, we couldn't find anything that matched your search.</h1>
   
                   <h3 class="arc-src"><span>You Can Try Another Search...</span></h3>
                   <?php get_search_form(); ?>
                   <p><a>" title="Browse the Home Page">« Or Return to the Home Page</a></p>
   
               <?php endif;
               wp_reset_query();
               ?>
   
           </div>
   
           <?php get_sidebar(); ?>
       <?php get_footer(); ?>
       ```
   
 * Can anyone spot where the problem is in the first block of code that is resulting
   in a compression error being thrown by browsers.
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [sahilsaid](https://wordpress.org/support/users/sahilsaid/)
 * (@sahilsaid)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-custom-loop-and-gzip-compression-error/#post-4493592)
 * Found the answer:
 * **paginator();** was the problem.
 * Removed it and it is now working.

Viewing 1 replies (of 1 total)

The topic ‘WordPress custom loop and Gzip compression error’ is closed to new replies.

## Tags

 * [compression](https://wordpress.org/support/topic-tag/compression/)
 * [custom loop](https://wordpress.org/support/topic-tag/custom-loop/)
 * [gzip compression](https://wordpress.org/support/topic-tag/gzip-compression/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [sahilsaid](https://wordpress.org/support/users/sahilsaid/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/wordpress-custom-loop-and-gzip-compression-error/#post-4493592)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
