Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter domsdey

    (@domsdey)

    Can’t anyone help?

    When the right sidebar is removed, what should happen with the empty space that will be left?

    Thread Starter domsdey

    (@domsdey)

    Uhm… THe field for posts should be larger?

    It would be presumptuous for me to assume that is what you wanted, although obviously its the most likely choice.

    You have some widgets installed in the right column. First you want to remove them. In Admin, Settings/Appearance/Widgets

    Then there is some code that needs to be commented out or deleted (your choice). It is PHP code so I can’t tell you exactly what it will look like as all I can see is the HTML after the PHP has been processed.

    Most likely it is in sidebar.php although some themes have a left sidebar file and a right sidebar file. If you have a right sidebar file, it can be easy. Find the place that includes the right sidebar file, most likely index.php – make a backup copy of it. Then delete the line that is including the right sidebar file.

    If both of your sidebars are defined in sidebar.php then you need to remove the code that displays the right sidebar. Again, make a backup file.
    It starts with
    <div class=”dynamic_widget”>

    You will find that twice – once for each sidebar – make sure you remove the right one.

    After that is gone and you are seeing the site without the right sidebar, find this in file style.css on line 260

    #content-main {
    float:left;
    width:547px;
    }

    change 547 to 747 and save. Should do it.

    Thread Starter domsdey

    (@domsdey)

    Damn shit fuck.
    Both sidebars are in one file, sidebar.php
    I found that in it:
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
    So I changed it to:
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?> but no effect.
    that’s functions.php:

    <?php
    
    if ( function_exists('register_sidebar') )
    
        register_sidebar(array(
    
        	'name' => 'Sidebar Left',
    
            'before_widget' => '',
    
            'after_widget' => '',
    
            'before_title' => '<h3>',
    
            'after_title' => '</h3>',
    
        ));
    
        register_sidebar(array(
    
        	'name' => 'Sidebar Right',
    
            'before_widget' => '',
    
            'after_widget' => '',
    
            'before_title' => '<h3>',
    
            'after_title' => '</h3>',
    
        ));
    
    ?>

    I modified it to:

    <?php
    
    if ( function_exists('register_sidebar') )
    
        register_sidebar(array(
    
        	'name' => 'Sidebar Left',
    
            'before_widget' => '',
    
            'after_widget' => '',
    
            'before_title' => '<h3>',
    
            'after_title' => '</h3>',
    
        ));
    
    ?>

    But still no effect…
    Any other ideas?

    Hi

    That code in functions.php is to initiate the widget-ready sidebars.

    Above you said:

    I found that in it:
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(1) ) : ?>
    So I changed it to:
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(1) ) : ?>

    Both lines look the same to me, before and after

    You know in the widgits manager, where you specify which sidebar you want to assign widgits to? That is where the sidebar #1 and #2 come into play. They are initiated in functions.php. you only want to initiate 1 sidebar

    Thread Starter domsdey

    (@domsdey)

    Hi
    I wanted to say I modified
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
    to
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(0) ) : ?>
    So what should I do?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Removing right sidebar’ is closed to new replies.