If you like the way the live demo site shows a contact page, this tutorial will help you get the exact same look and functionality as the demo site shows.
Create a Page
- Go to Appearance >> Pages >> Add New
- Title your page and write an intro to your contact page
- Select the Default Template for the page which will give you a right sidebar
- Click Publish (or Update)
Install Contact Form 7
- Go to Plugins >> Add New
- Type in “Contact Form 7” in the field
- Click Install and Activate it (it gets added to the top part of your admin menu group as “Contact”
- Go to Contact >> Contact Forms >> then open the sample form that is there
- Go to the “Form Snippet” you see below and copy the code
- Paste the code in the contact form 7 plugin and replace their sample form code with ours.
- Go through the settings for your form, such as the email address and any other form settings you need. Refer to the plugin’s own documentation to help you out.
- Click Save
- Copy the shortcode that you will see. It will look something like this:
Error: Contact form not found.
and then open the Contact page you made earlier and switch to the “Text” tab on the editor and paste the shortcode below your content area. - Click Update and view your page to see if the form shows up.
Form Snippet
<div class="cir-divider-space clearfix"></div>
<div class="input-group"><div class="input-group-addon"><div class="icon-user"></div></div>[text* text-300 class:form-control]</div><br />
<div class="input-group"><div class="input-group-addon"><div class="icon-envelope"></div></div>[text* text-300 class:form-control]</div><br />
<div class="input-group"><div class="input-group-addon"><div class="icon-arrow-right3"></div></div>[text* text-300 class:form-control]</div><br />
[textarea* textarea-329 x6 class:form-control][submit class:btn class:btn-sm "Send"]
Setup Your Sidebar Widgets
- Go to Appearance >> Widgets >> and drag a text widget into the Page Right Sidebar position
- Title this widget as “Company Hours”
- Copy the Company Hours snippet you see below into the widget.
- Click Save
- Drag another widget and then copy the Company Address snippet and paste it into the widget
- Click Save
Company Hours Snippet
<p>Our current hours are listed below showing when we are available from Monday to Friday:</p><table class="table table-bordered"> <colgroup> <col class="col-xs-1" style="background-color: #eee;"> <col class="col-xs-7"> </colgroup> <tbody> <tr> <td><strong>Monday</strong></td> <td>9am-5pm</td> </tr> <tr> <td><strong>Tuesday</strong></td> <td>9am-5pm</td> </tr> <tr> <td><strong>Wednesday</strong></td> <td>9am-5pm</td> </tr> <tr> <td><strong>Thursday</strong></td> <td>9am-5pm</td> </tr> <tr> <td><strong>Friday</strong></td> <td>9am-5pm</td> </tr> </tbody> </table>
Company Address Snippet
<<address> <p style="margin-bottom: 10px;">12345 Any Street, <br>Vancouver, British Columbia<br>Canada A5B 5C5</p> </address> <p style="margin-bottom: 10px;"><strong>Phone:</strong> (555) 123-4567<br>
<strong>Mobile:</strong> (555) 890-1234<br> <strong>Fax:</strong> (555) 987-6543</p>
Setup Your Map
- Go to Plugins >> Add New
- Search for “WP Google Maps” and click install and then activate it. You will see this get added to your admin menu group near the bottom.
- Go to Maps >> Maps >> Then open the map that is there which is a sample starter map.
- Set the Width to 100%
- Set the Height to whatever you want, but to begin, try 300px
- Click Save Map
- Scroll down to “Your Markers” and click the “edit” link. In the “Add a Basic Marker” just above, type in your address you want in the “Address/GPS” field
- Click Save Marker
- Using your mouse, adjust the map in the preview window above to position it and zoom in to how close you want it.
- Click Save Map when happy.
- Copy the Shortcode that you will see near the top of the page.
- Go to Appearance >> Widgets >> and drag a text widget into the Banner Wide position, then paste the shortcode there.
- Click Save