Hi, today we will learn WordPress page template development, contact us page with the contact form, using contact form 7 plugin, contact form 7 plugin will provide a shortcode which has to place in a wishing editor or in page by
Now start to create a contact us page step by step
Step 1.
First, create a file inside your theme folder by any name ex template_contact.php and write the code in PHP tag as commenting to declare the template name and it will be shown on the admin panel.
Step 2.
Get the HTML design code and paste on it.
Step 3.
Place in the common portion for the header template. , Place
in the portion for the footer template and if needed use
for the sidebar portion for the sidebar template.
Step 4.
Now after write the code
to get all the post content.
Step 5.
Now in the position of title write the code to print the title and in the position of content writing
and in the position of featured image write the code
Step 6.
Now go to contact to set up a contact form and get the shortcode and paste in the content portion of the page content or write the code to create contact form 7 and get the shortcode to follow the admin tutorial of contact form 7 plugin
Step 7.
Now for the google map field go to advance custom field menu from admin panel and create fields for the page template to create a field using custom field please follow our advance custom field plugin admin uses tutorial
Step 8.
Now print the field in the template_contact.php page by using or you can get the field value by using
Now here is a sample code for contact us page
ID)); ?>" alt="" />
Now you have learned how to create a custom template page in next post we will learn to develop the WordPress newsletter subscription using mail poet newsletter plugin