Title: Comment page problem
Last modified: August 30, 2016

---

# Comment page problem

 *  Resolved [freedumbo](https://wordpress.org/support/users/freedumbo/)
 * (@freedumbo)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/comment-page-problem-2/)
 * Hello.
    I use this on my category.php It show comment well. Everything seems 
   to be good. But When I type comment, it show error 404 or 409. “Comment stop”
   If I refresh page the comment show result. It’s not bad.
 * The error code show like this.
    **jquery.js?ver=1.11.2:4 GET [http://sitename.com/?enhanced-category=222](http://sitename.com/?enhanced-category=222)
   404 (Not Found)** My category page is [http://sitename.com/?cat=2](http://sitename.com/?cat=2).
   But “submit buttom” lead to /?enhanced-category=222 how to handle this? I don’t
   make that page. this plugin don’t make that page also.
 * this is the source what I use.
 * <?php
    global $blogConf; get_template_part(‘page’, ‘defaults’); //here. category
   name delete $blogConf[‘title’] = __(“”, “themeton”) . ” ” . single_cat_title(“”,
   false); $blogConf[‘teaser_text’] = category_description(); get_header(); ?> <?
   php //$categories is presumed to be an already fetched array of categories/terms
   foreach($categories as $category) { $GLOBALS[‘enhanced_category’]->setup_ec_data(
   $category->term_id); the_post_thumbnail(‘thumbnail’); }?> <?php global $enhanced_category;//
   get enhanced category post and set it up as global current post $enhanced_category-
   >setup_ec_data(); ?> <!– enhanced category content –> <?php the_post_thumbnail(“
   medium”); ?>
 * <?php get_template_part( ‘content’, ‘page’ ); ?>
 * <!– custom fields –>
    <?php get_post_custom(); ?>
 * <?php
    // If comments are open or we have at least one comment, load up the comment
   template if ( comments_open() || get_comments_number() ) : comments_template();
   endif; ?>
 * <section id=”page” class=”clearfix”>
    <div class=”content”> <div id=”masonry”
   class=”clearfix”>
 *  <div class=”mansonry-container”>
    <!– start here new category –>
 *  <!– Start Featured Article –>
    <?php get_template_part(‘loop2’);?> <!– End Featured
   Article –> </div> <?php infiniteScroll(); ?> </div> </div> </section> <!– End
   Page –> <?php get_footer(); ?>
 * [https://wordpress.org/plugins/enhanced-category-pages/](https://wordpress.org/plugins/enhanced-category-pages/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [cip](https://wordpress.org/support/users/cip/)
 * (@cip)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/comment-page-problem-2/#post-6355657)
 * Hi!
 * The comments are attached to the custom post the plugin creates and the `wp-comments-
   post.php` (the script that handles posting comments) redirects to that page, 
   in your case `/?enhanced-category=222`
 * In order to solve this, you have to add a hidden field in the comment post form.
   You can do this by adding some extra arguments when `comment_form` function is
   called, presumably in `comments.php` script in your theme folder.
 * Now the code:
 *     ```
       $args = array( 'comment_notes_after' => '<input type="hidden" name="redirect_to" value="' . $_SERVER['REQUEST_URI'] . '" />');
   
       comment_form($args);
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Comment page problem’ is closed to new replies.

 * ![](https://ps.w.org/enhanced-category-pages/assets/icon-256x256.png?rev=1101510)
 * [Enhanced Category Pages](https://wordpress.org/plugins/enhanced-category-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enhanced-category-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enhanced-category-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/enhanced-category-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enhanced-category-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enhanced-category-pages/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [cip](https://wordpress.org/support/users/cip/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/comment-page-problem-2/#post-6355657)
 * Status: resolved