I set a template and my default template is 2 columns and i have a page that i want to have a 1 column. How can I make that in wordpress? is it a code for the functions.php?
Please suggest and thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have different options and you could choose the one you prefer 🙂
If your theme already supports a one-column page you should have on the right side of your edit page screen a box “Page attributes” with a select box named “Templates” when you could choose a different template (in default WordPress theme “TwentyTen” is it called “One column, no sidebar”).
If your theme doesn’t support a one-column page you could create a custom page template by yourself:
* Template Name: The name you want for your template<?php get_sidebar(); ?>If you don’t like the “new template + select box” way you could directly add a “IF” on your “page.php” to comment-out the get_sidebar() when needed, based on $post->ID or similar checks.
After this probably you’ll have to edit your .css (adjusting width) and new-page.php (like adding a class “one-column” to the div container) to fit the dimensions.