WordPress.org

Ready to get started?Download WordPress

Forums

Priimo
[resolved] removing sidebar from posts (6 posts)

  1. saltyseadog
    Member
    Posted 1 year ago #

    I need to remove the sidebar from all posts. I have tried adding a

    .post #sidebar {
    display: none;
    }

    line to my css and have also tried removing

    <?php get_sidebar(1); ?>

    from my single.php but neither work. My php knowledge just isn't quite up to it. I get the feeling that 'sidebar' is named differently in Priimo hence why it won't work.

  2. mikeyarce
    Member
    Posted 1 year ago #

    hey @saltyseadog,

    can you send me a link to your site?
    Also - are you trying to remove the sidebar from every individual post page or the page that displays all the recent posts?

  3. saltyseadog
    Member
    Posted 1 year ago #

    Hi mikeyarce

    unfortunately i am developing the site locally on my laptop so I can't send you the link.

    I want to remove the sidebar from all post pages.

    thanks

  4. mikeyarce
    Member
    Posted 1 year ago #

    Hey,

    no problem - I'm sure we can figure it out without a live link.
    1. Are there any theme options under "Appearance - Theme Options"?
    Possibly there you might see options for enabling/disabling the sidebar.

    2. If not - you want to edit Index.php and not single.php.
    single.php takes care of the single-blog post page. index.php takes care of your latest blog posts.

    Check out: Template_Hierarchy
    to see what templates do what. It's a pretty useful document.

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    are you trying to remove the sidebar from single post pages or from all index pages and archive pages?

    for example, the sidebar call is in single.php near the top and also near the bottom - have you removed both?
    same in index.php ?

    also, the grey 'sidebar' is a background image on the #content div; the style for it gets embedded in the head section:
    #content { background-image: url(http://localhost/wordpress/wp-content/themes/priimo/images/wrapper_left_bg.png); background-repeat: repeat-y; background-position: -250px 0; }

    you will need to overwrite this in style.css of your, for instance just for single posts, with:
    .single #content { background: none!important; }
    or generally:
    #content { background: none!important; }

    PS:
    you also need to adapt the .container width

  6. saltyseadog
    Member
    Posted 1 year ago #

    thank you both. the sidebar has now gone and I have adapted the .container width.

    many thanks

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic