WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(First of all, sorry for bad english)

If there are people here using wordpress as cms, you probably realize that you dont need comment system that much. Esspecially custom post types like products need a contact form system that saves coming input.

What i am dreaming but cant coding:

Changing comment system for custom post types. Let me explain on an example: Lets say we have a custom post type thats using for product list. We dont need/want customer comments on this product but we want customers send us what they are thinking on this product. So they will use this "custom comment type" system and sending us a comment but this comment is not publishing on website and in admin panel, when we reply to comment, wordpress will send that reply as e-mail.

So we can see all new contact form inputs about this product in a list as archieved in wordpress comment table and we can reply them from admin panel. When product is updated or a special discount or something, we will have a list of customers that previously asked a question about it so we can contact them again about new updates.

In background, as performance, product custom post type not need to load comments so this will reduce database queries.

What do you think about it? Possible?

share|improve this question
let me link some adress about this topic, maybe those links will help me explain possibility of comment system: – Ünsal Korkmaz Apr 9 '11 at 8:39
Related Q&A: How to enable comments for pending and draft posts? – brasofilo Nov 27 '12 at 17:39
up vote 2 down vote accepted

I also (ab?)use comments for "private" replies to posts, like product inquiries, suggestions, answers to contests, ... The advantage is that they are stored in the database and displayed in the interface without extra code from me (sometimes I add a filter to improve the formatting). Spam filtering and e-mail notifications are easy extras.

I think it is possible to create a custom comment type framework on top of the current system, thus as a plugin without internal changes. Maybe, if I ever find the time, I'll experiment with that...

share|improve this answer
glad to see experienced people understand me. 1 more example in wptavern.com/forum/general-wordpress/… from greenshady "Extend custom comment types functionality" – Ünsal Korkmaz Apr 15 '11 at 8:15

If you are unsure about something i wrote here: Please use a dictionary english/turkish.

What do you think about it? Possible?


when we reply to comment, wordpress will send that reply as e-mail.

You will have to use some sort of comment notification for this. This would then send an e-mail if you posted a reply to the "comment".

and we can reply them from admin panel

This won't be too easy. Easier would be to use something like

if ( current_user_can('some_capability') ) 
    comment_form(); // shows the comment form

in your templates, which will make the comment form only visible for people who are

  • logged in and
  • have the appropriate capability

and then reply directly on your public page. Everything else would be much more complicated.

share|improve this answer

You can use a simple form to get the customers comments on the product and replay by mail.

here is something i used long time ago and i should do the job for you, its a simple form with minor validation, just change: Your_mail to your mail address

if (isset ($_post['submit'] && $post_['my_action'] == 'product_comment'){
    if (wp_verify_nonce($_POST['product_comment'],'p_comment')){ 
    global $post;
        $error =  false;
        $em = array();
        if (!isset($_post['pc_name'])){
            $em[] = __('Name');
            $error = true;
        if (!isset($_post['pc_email'])){
            if ($error){$em[] = __(', Email');
                $error = true;
                $em[] = __(', Email');

        if (!isset($_post['pc_phone'])){
            if ($error){$em[] = __(', Phone');}
                $em[] = __('Phone');
                $error = true;
        if (!isset($_post['cp_feedback'])){
            if ($error){$em[] = __(', Your Feedback');
                $em[] = __('Your Feedback');
                $error = true;
        if (!$error){
            $subject = 'New '. $post->post_title . ' Feedback';
            $M = "Name: $_post['pc_name'] \n
            Email: $_post['pc_email']\n
            Phone: $_post['pc_phone']\n
            Feedback: $_post['cp_feedback']";
            wp_mail('Your_mail',$subject, $M);

        $em[] = 'squrity error';
        $error = true;
<h3><?php _e('Leave Your Feedback'); ?></h3>
<?php if($error){
            echo _e('please correct the following: <br/>');
            foreach ($em as $e){
                echo $e;
            }} ?>
<form id="product-comment" name="product-comment" action="" method="post">
<p><?php _e('Name'); ?></p>
<p><input type="text" name="pc_name" id="pc_name"></p>
<p><?php _e('Email'); ?></p>
<p><input type="text" name="pc_email" id="pc_email"></p>
<p><?php _e('phone'); ?></p>
<p><input type="text" name="pc_phone" id="pc_phone"></p>
<p><?php _e('Your Feedback'); ?></p>
<textarea tabindex="4" rows="13" cols="50%" id="cp_feedback" name="cp_feedback"></textarea>
<?php wp_nonce_field('update-p_comment','product_comment'); ?>
<input type="hidden" name="my_action" value="product_comment">
<input type="submit" name="submit" value="send">
share|improve this answer
well, dont get me wrong but i have gravityforms developer version. I am not looking for a contact form tbh. Maybe i couldnt explain enough :-/ – Ünsal Korkmaz Apr 8 '11 at 9:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.