• T B

    (@bekefitibor)


    Hi guys,

    I would like hide the sidebar from some page.
    I know I can remove the <?php get_sidebar(); ?> from page.php but the theme is three column and we need one column page. Controll would be nice from the “Page Attributes” option on the “edit page”

    I am new with .css yet.

    Thanks a lot!

    https://www.ads-software.com/extend/themes/vita/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter T B

    (@bekefitibor)

    New page file create: page_onecolumn.php
    Remove the: <?php get_sidebar(); ?>

    Add the css #page_onecolumn

    Original
    #page
    #content {
    margin: 0 470px 0 0;/* margin: 0 280px 0 190px;*/
    }
    .side1 {
    width: 250px;
    float: left;
    margin-left: -250px;
    }
    .side2 {
    width: 180px;
    float: left;
    margin-left: -450px;
    }

    Modified
    #page_onecolumn
    #content {
    margin: 0 970px;/* one column */
    }

    Is that ok?

    What is the next step?

    Help please

    Thread Starter T B

    (@bekefitibor)

    I made a custom page-onecolumn.php and add above the header
    I can select on Page attributes–>Template

    <?php
    /*
    Template Name Posts: One Column Post
    */
    ?>

    I made a custom post-onecolumn.php and add above the header
    I can not select yet! We need a Costom Post Template plugin to get it work.

    <?php
    /*
    Template Name: Onecolumn Page
    */
    ?>

    Remove the sidebar code from customised page and post files
    <?php get_sidebar(); ?>

    Now I need edit the css.
    Isn’t it?

    Help me please ??

    Thread Starter T B

    (@bekefitibor)

    Ok

    I have copied the style.css and renamed as onecolumn.css

    After insert this code in the header.php

    After this part
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    <?php if(is_page_template('page-onecolumn.php')) :?>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/onecolumn.css" media="screen" />
    <?php endif;?>

    Now I can edit the onecolumn.css separately

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Theme: vita] Optional one column page’ is closed to new replies.