Support » Plugin: WP Customer Reviews » Enable WP Customer Reviews for custom post types

  • Resolved customfit

    (@customfit)



    Hello, I was just wondering if there is a code I could insert to automatically enable wp customer reviews for custom post types (products in my case), instead of manually going into each post and clicking on enable feature.
    I have a front end form submitting a product with all the information such as product name, description, id etc and I would like this to be added to the customer reviews fields on submit for each product.
    Thank you!

    • This topic was modified 11 months ago by  customfit.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Dilip Gupta

    (@dilip7597)

    Hey, I’m looking for the same. I’m trying it, if I get any success I will definitely share it with you. If you find a solution, then please share it with me.

    customfit

    (@customfit)

    Hello, I finally figured out how to enable the wp customer reviews and use the fields for the product from the submitted form.
    In your front end caldera form you need to add following fields – All Hidden:
    – Review Enabled      slug: wpcr3_enable   &nbsp value: 1
    – Review Format     slug: wpcr3_format   &nbsp value: product
    – Product Brand     slug: wpcr3_product_brand   &nbsp value:% magic tag %
    – Product ID     slug: wpcr3_product_id   &nbsp value: % magic tag %
    – Product Name     slug: wpcr3_product_name   &nbsp value: % magic tag %

    % magic tag % (check your slug for the field on your form and place it between %…%, choose it from the dropdown in the value field

    I filled out a test form (front end submission) and it worked perfectly! The wp customer reviews were enabled by default, all the fields were filled out.
    Hope it helps!

    • This reply was modified 11 months ago by  customfit.
    • This reply was modified 11 months ago by  customfit.
    • This reply was modified 11 months ago by  customfit.
    customfit

    (@customfit)

    Please disregard all the &nbsp in between the slug and the value.
    I’ve tried to edit my reply, but could’t delete them.

    Here is the updated code:
    In your front end caldera form you need to add following fields – All Hidden:
    – Review Enabled slug: wpcr3_enable value: 1
    – Review Format slug: wpcr3_format value: product
    – Product Brand slug: wpcr3_product_brand value:% magic tag %
    – Product ID slug: wpcr3_product_id value: % magic tag %
    – Product Name slug: wpcr3_product_name value: % magic tag %

    Plugin Author Aaron Queen

    (@bompus)

    Looks like you resolved it for the product plugin / theme that you are using. For reference for others, to enable reviews to be left on a page/post, you need to edit the post, check a box to enable it, and fill out some necessary information for the review microformat to validate properly.

    It does work on posts, custom post types, and pages out of the box.

    Thank you Aaron for replying. In my case I didn’t want to edit each post manually. I needed it to be done automatically from the front end submission form. But I got it working with my previous solution.
    Have a good day!
    Andrea

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Enable WP Customer Reviews for custom post types’ is closed to new replies.