Hi,
I would like to hide sidebar 2,3 and 4 on http://www.thailandliving.se
How do I do that?
Thanks
moviezman answers:
Go to Dashboard/Appearance/widgets and remove what you want from the sidebar (click then delete.
moviezman comments:
Go to Dashboard/Appearance/Edit then edit index.php
Remove
<?php get_sidebar2(); ?>
<?php get_sidebar3(); ?>
or
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
<?php include (TEMPLATEPATH . '/sidebar3.php'); ?>
if you find them ...
Before deleting Make a copy of index.php by security
Charlotte Raboff comments:
Hi, yes that worked!
the <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
But there are still grey lines left, maybe that is another question...:)
moviezman comments:
For the Grey buttons, it is in CSS:
You have the choice, remove this :
1- Remove in the index.php -- <div class="side_bottom"></div>
2-Or remove in CSS this line in bottom if you don't need
.side_bottom {
background: url("images/sidebottom.gif") no-repeat scroll left bottom transparent;
height: 8px;
width: 230px;
}
Charlotte Raboff comments:
thanks....it worked for two of them but there is on left and I can´t find the code for that one...
Dan | gteh answers:
can you post the contents of your sidebar.php? or msg me your FTP details and I can do it.
Charlotte Raboff comments:
I have actually 4 sidebar files =
sidebar1.php
<div id="sidebar1">
<ul>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) : else : ?>
<li>
<h2><?php _e('Categories'); ?></h2>
<ul>
<?php wp_list_cats('sort_column=name&hierarchical=0'); ?>
</ul>
</li>
<li>
<h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li>
<h2><?php _e('Links'); ?></h2>
<ul>
<?php get_links(2, '<li>', '</li>', '', TRUE, 'url', FALSE); ?>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
sidebar2.php
<div id="sidebar2">
<ul>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(3) ) : else : ?>
<li>
<h2>About the Blog</h2>
<ul><li>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce commodo nulla at metus. Sed id lectus. Phasellus in erat. Donec metus sapien, egestas a, congue sed, facilisis ut, enim.
</li></ul>
</li>
<li>
<h2><?php _e('Recent Posts'); ?></h2>
<ul>
<?php get_archives('postbypost', '10', 'custom', '<li>', '</li>'); ?>
</ul>
</li>
<li>
<h2><?php _e('Meta'); ?></h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
sidebarBottom.php
<div id="sidebar3">
<ul>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(4) ) : else : ?>
<li>
<h2><?php _e('Categories'); ?></h2>
<ul>
<?php wp_list_cats('sort_column=name&hierarchical=0'); ?>
</ul>
</li>
<li>
<h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li>
<h2><?php _e('Links'); ?></h2>
<ul>
<?php get_links(2, '<li>', '</li>', '', TRUE, 'url', FALSE); ?>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
sidebarTop.php
<div id="sidebar1">
<ul>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
<li>
<h2><?php _e('Categories'); ?></h2>
<ul>
<?php wp_list_cats('sort_column=name&hierarchical=0'); ?>
</ul>
</li>
<li>
<h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li>
<h2><?php _e('Links'); ?></h2>
<ul>
<?php get_links(2, '<li>', '</li>', '', TRUE, 'url', FALSE); ?>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
Romel Apuya answers:
can you be specific what are those? on the sidebar?
Romel Apuya comments:
in your template css add
#sidebar2,#sidebar3,#sidebar3{
display:none;
}
Romel Apuya comments:
also add #sidebar4
Charlotte Raboff comments:
Thanks.. I have added the code now to the ccs but it didn´t really work, look at the website now, one sidebar is still there (categories) and below is a grey line from another...
Romel Apuya comments:
the categories with blue text or grey text?
Romel Apuya comments:
add to the bottom of your css
#sidebars b .side{
display:none;
}
Romel Apuya comments:
ok revise it to
#sidebars b .side{
display:none !important;
}
Luke America answers:
<strong>Method #1:</strong>
Without actually modifying your sidebar source code, in sidebars.php for example, here's a CSS trick that should make them disappear.
At the bottom of your style.css file, add the following:
#sidebar1 {display:none;}
#sidebar2 {display:none;}
#sidebar3 {display:none;}
OR
<strong>Method #2:</strong>
Open your theme's functions.php file, and make the following change:
register_sidebars(4);
to
register_sidebars(1);
OR
<strong>Method #3</strong>
The best method is to comment out the sidebar code in your theme files (put two backslashes before the code, it, //). But, these particular filenames vary from theme to theme ... examples are sidebars.php, sidebar.php, etc. Also, some themes implement these sidebars one by one in the other files, such as, page.php, single, php, index.php.
Also, some themes will simply let you delete the content from the Dashboard. But, your theme appears to be using default content. So ... you can not remove it that way.