< Browse > Home / Uncategorized / Blog article: Customizing wordpress page without sidebar or footer

| Mobile | RSS

Customizing wordpress page without sidebar or footer


To create a custom wordpress page just follow these steps.

1. Make a copy of page.php

Create a copy of your wordpress theme’s page.php (which is in the path /wp-content/themes/your-theme) and save it as custom-page.php (or your own name) and save it in the same path.

2. Give a Template name for the custom page

Edit the custom-page.php file created in the step 1. and add the following code in very top of that page.

<?php
/*
Template Name: CustomPage
*/
?>

You can give any name for the  Template Name.

3. Customize the page

Continue editing the same custom-page.php, you can customize the page in the way you want.

For example if you don’t want the side.bar in your custom page just remove the corresponding code (<?php get_sidebar(); ?>). In the similar way you can remove the footer also.

4. Implementing custom page

wpCustomPage

Create the page you want to edit and you will see a “page template” box on the right, from the dropdown choose “CustomPage” and save / publish your file.

|