Define theme template in wordpress

0.69K views
no comments
21 Apr 2015 12:53 am

#wordpress provide a good page template feature show page layout in different layouts like single-column, double-column, full-page, or custom-template. default template is page.php for page, so you want to show contact form or different layout from other page.

To define your layout  go to  /wp-content/themes/theme_folder/ create file with php extension,  in the top of line write below code, I am create file with named contact-template.php -template is just used to easily identify that is template.

<?php //template name: contact

Now its time to go to edit page of contact us select contact template from Page attribute, and you will see contact page view whatever defined in contact-template.php file.

If you are beginner please read first the wordpress template hierarchy and the loop

NOTE:Your Email Address will be not shown and please do not add spamming comments because here is REL="NOFOLLOW" on your links and comments also moderated shown.
<code>Put html css or any language code under this tag</code>