• Resolved EricNikki

    (@ericnikki)


    Hi everyone,

    Two questions:

    1. Could you please tell me how to remove the right sidebar from all of my posts in the Lifestyle Child Theme? https://1309.fr/tristans-cal-mex/

    I would also like to remove the sidebar from the category pages:
    https://1309.fr/category/eat-drink/

    I tried going into the style.css file and deleting all sections titled “sidebar”, and it seemed to do the trick but I was worried about whether I might have messed up other parts of the theme, so I restored to the default style.css. Hoping someone here can give me a more informed guide!

    2. I would also like to remove the title, publication date, author and “leave a comment” link which seem to appear by default at the top of the page. Any help would be greatly appreciated!

    I am doing most of the editing with visual composer.

    Thanks

    Nikki

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter EricNikki

    (@ericnikki)

    Ok I think I’ve resolved it combining advice from other threads, but as I’m completely new to wordpress it would be great if someone could confirm whether I’ve done the right thing!

    For Problem 1: remove sidebar, I replaced the original “sidebar-primary” code with the code below in the style.css file. So it now reads:

    /* Primary Sidebar */

    .sidebar-primary {
    display:none;
    }
    .content {
    float: none;
    width: 100%;
    }

    And for Problem 2, I edited the entry-title.php file by adding:
    style=”display: none; height= 0px;”

    so that it now reads

    <?php
    if ( is_home() || is_archive() || is_search() ) {
    ?>
    <h2 class=”entry-title” itemprop=”headline” style=”display: none; height= 0px;>” rel=”bookmark”><?php the_title(); ?></h2>
    <?php
    } elseif (!is_singular(‘page’)) {
    ?>
    <h1 class=”entry-title” itemprop=”headline” style=”display: none; height= 0px;><?php the_title(); ?></h1>
    <?php
    }
    ?>

    It looks ok now but have I done the right thing? I hope I haven’t deleted or disabled any other useful functions in the theme! Any confirmation would be greatly appreciated. Thanks ??

    That will do the trick. But to keep your customization from theme upgrade, you can insert your custom css into “Appearance > Customize > CSS”

    .sidebar-primary, h2.entry-title, h1.entry-title {
    display:none;
    }
    Thread Starter EricNikki

    (@ericnikki)

    Thanks themehit

    And whereabouts in the css file should I paste your line of code? Do I just add it in or do I need to replace another line of code with it?

    Cheers

    Thread Starter EricNikki

    (@ericnikki)

    Ah no worries I found it, sorry I thought you were referring to Appearance > Editor > style.css sheet!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove sidebar and title from all posts – Lifestyle Child Theme’ is closed to new replies.