WordPress.org

Forums

[resolved] How to apply a layout style to a single page? (5 posts)

  1. Nos402
    Member
    Posted 5 years ago #

    I would like my main blog to be 2 column but all "pages" to be single column. How can I achieve this? Next to the layout style settings it says "Use page templates if you want to apply these only to specific pages".

    Thanks. I'm brand new to WP. Been using MT for years and am thinking of switching!

  2. ThorHammer
    Member
    Posted 5 years ago #

    Copy index.php and name it page.php

    Then, create css for your page.php and define all content to exist within one column.
    Like, for instance:
    #page_template_wrap {width:100%;text-align:left;}
    and then create styles beneath this wrap, like:
    #page_template_wrap .content {define your content styles inside the page wrapper}
    Be sure to keep everything within the page wrapper in order to have only one column.

    Then, in the end of page.php, remove the
    <php include_sidebar(); ?> (If it is there).

  3. digitalnature
    Member
    Posted 5 years ago #

    no.

    check the "template" attribute in the right column when you're editing a page. there you can select the type of layout you want for that page.

    if you want this for posts too, add a custom field named "layout" with values like "col-1" , "col-2-left" , "col-3" , "col-3-right" etc.

  4. Nos402
    Member
    Posted 5 years ago #

    Wow. Can't believe I missed that. I guess there's just so much to take in switching publishing platforms. Thanks!

  5. steffercat
    Member
    Posted 4 years ago #

    Nos402-

    I find no "template" attribute, no attribute and see no right column
    when I am editing a Page.

    Can you give me the path for where this "template attribute" thing is
    that you were able to locate after digitalnature told you about it?

    I'm trying to do the same thing you are, but I sure
    can't find anything like what you guys are discussing.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags