0

I am very interested in creating a coupon plugin for Wordpress, where many of the existing options do not meet my current needs. I have build the core plugin and it is working as expected now so I feel like I am getting close to accomplishing this task.

The problem is that I would like to implement custom fields into the plugin and have them easily set by the authors. These would be things like coupon code, discount amount, expiration date, etc. This plugin (coupon creator) seems to have the layout I am looking for on the Post page, but I have been unable to figure out how its done, where these do not appear to be the "Custom Fields" shown in other tutorials.

How would I go about replacing the large WYSIWIG Editor box with fields like this instead for my CPT?

enter image description here

2

You can do this by not including "editor" in the "supports" argument.

And then add a new meta box using add_meta_box() in whose call back you can add all the post meta's as required.

1

You can try My Meta Box. With this code you can create custom metabox with custom fields includes file uploads, WYSIWIG Editor.

Demo usage is here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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