WordPress.org

Support

Support » Themes and Templates » [Resolved] How to customize a page to one column layout?

[Resolved] How to customize a page to one column layout?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Christine Rondeau
    Volunteer Forum Moderator

    @crondeau

    One way to do this would be to make a child theme and in your theme, you would create a custom template for that one page.

    Another way would be to use a plugin like widget logic that allows you to hide the widgets from certain pages.

    Roll
    Member

    @pinewho

    I suggest to duplicate page.php and rename it.
    After that remove code within which defines sidebar and that you will be able to choose template on that page without sidebar.
    this should also help

    so, i did use something like widget logic – dynamic widget and able to get rid of the sidebar, but the page won’t stretch the whole way. Any clue where to look next, i want my ‘forum’ page to stretch ,
    thanks

    Theme Author Christine Rondeau
    Volunteer Forum Moderator

    @crondeau

    HI cingsen,
    In that case, you’ll need to make some changes to your css.
    Did you create a child theme?
    If so, can you provide a link to your site?
    I can have a look and give you the css you need to add.

    You can add custom width to any page by using the body_class().

    so fixed it, here is what i did:
    i edit the style.css , i added inside #main
    .site-content2 {
    float: left;
    width:960px;
    padding:30px 20px;
    }

    next i created a child template called fullwidth.php
    with this code
    <?php
    /*
    Template Name: Full Width
    */
    ?>
    <?php

    get_header(); ?>

    <div id=”primary” class=”site-content2″>
    <div id=”content” role=”main”>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php get_template_part( ‘content’, ‘page’ ); ?>

    <?php comments_template( ”, true ); ?>

    <?php endwhile; // end of the loop. ?>

    </div><!– #content –>
    </div><!– #primary .site-content –>

    <?php get_footer(); ?>

    and it works perfect,
    let me know if this is ok ?
    thanks

    AriRome15
    Member

    @arirome15

    Is there a way to change the whole theme to be full width?

    Theme Author Christine Rondeau
    Volunteer Forum Moderator

    @crondeau

    Making the necessary changes for a full width sites would require quite a bit of work.
    In your style.css, you would have to change all instances of width in pixels to percentages.

    The theme wasn’t designed to be full-width. I’m sure it can be done, but it’s not just one line of code unfortunately.

    AriRome15
    Member

    @arirome15

    Cool, got it. Thanks for the this theme btw, it’s awesome!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] How to customize a page to one column layout?’ is closed to new replies.