• Resolved ollerwe

    (@ollerwe)


    Hi!

    I want my single posts to be full wide and the sidebars to disappear to create more space. Reading and searching around I thought that the simple solution would be to remove the “get sidebar”- call from single.php.
    But there is no mention to the sidebar in that file! (I am using Magazine Basic, and my site is https://www.swed.info).
    Where does the sidebar call come from and how can I remove it just for single posts?
    Best regards
    Erico

Viewing 3 replies - 1 through 3 (of 3 total)
  • The call to sidebar is in footer.php of the theme.

    But it is not straightforward removal of “get sidebar” stuff.

    The call contains some if clauses. To prevent the sidebars from appearing on your single post page you will have to introduce an if is_sidebar condition to the code snippets. I tried what follows and it worked for me!

    <?php
    if (!is_single()) {
    if(get_option(‘uwc_sidebar_location’) == “oneright”) {
    get_sidebar(1);
    }
    if(get_option(‘uwc_site_sidebars’) == “2” && get_option(‘uwc_sidebar_location’) == “twoseparate”) {
    include(TEMPLATEPATH.’/sidebar2.php’);
    }
    if(get_option(‘uwc_site_sidebars’) == “2” && get_option(‘uwc_sidebar_location’) == “tworight”) {
    get_sidebar(1);
    include(TEMPLATEPATH.’/sidebar2.php’);
    }
    }
    ?>

    HTH

    S.K

    Thread Starter ollerwe

    (@ollerwe)

    Thank you for your quick help.
    I understand what you mean because removing the call in the footer leaves me without sidebar all over the site.
    I will try your script.
    Thanks!
    Erico

    Thread Starter ollerwe

    (@ollerwe)

    It worked nicely.
    Now I will search de forum to see how I can get the post to make use of the empty room left by the sidebars.But that is another issue.
    Thank you for your help!
    Erico

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing sidebars from single post’ is closed to new replies.