Certain fields are optional on the checkout form. Here's a list of all the fields that are optional and thus can be hidden if desired:
- First Name
- Last Name
- Phone Number
- Billing Address
- Billing City
- Billing State
- Billing Zip Code
- Billing Country
- Shipping Address
- Shipping City
- Shipping State
- Shipping Zip Code
- Shipping Country
- Shipping Method
You can learn more by reading the Form Field SmartTag article.
In order to demonstrate how to hide these field options on the checkout form, we'll use the Phone Number field as an example.
As an Example, Here's How to Hide the Phone Number Field
If you want to remove the phone number from the checkout page, do not delete the SmartTag from the form, instead do this:
[MM_Form_Field type='hidden' name='phone']
When the phone number field is included like this, it won't show up on the checkout form.
Stop Empty Spaces from Being Created When Hiding a Field
By default, WordPress automatically converts double line-breaks in text into HTML paragraph tags (<p>...</p>). To keep this from happening, refer to and follow the instructions outlined in the article Extra Lines Are Being Added to the Checkout Page.
Here is Another Trick to Keep the Empty Spaces From Appearing
If you have tried the article above and are still getting empty spaces, or you simply do not want another plugin to worry about, then you would need to place one SmartTag immediately after another SmartTag on the same line, as outlined below:
[MM_Form_Field type='input' name='password'][MM_Form_Field type='hidden' name='phone']
When the phone number field is included like this, it won't show up on the checkout form, and you shouldn't get any blank or empty spaces below the password field.
If you want more control over the appearance of the page, you can try customizing the MM stylesheet, or replacing it with one of your own: