WordPress.org

Ready to get started?Download WordPress

Forums

adding a single sidebar to use above the two sidebars (3 posts)

  1. analutetia
    Member
    Posted 4 years ago #

    Is it possible in the Elements of SEO theme to have a single sidebar with the size of the left sidebar and right sidebar? I wanted to use it above the two sidebars.

    http://www.alibiproductions.com/html/elements-of-seo.html

  2. Kellytong
    Member
    Posted 4 years ago #

    sorry, I don't know.
    -------
    http://www.dvdshop88.com

  3. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    it is posible, however it depends on how much editing you would like to do.

    for instance, you could copy one of the sidebar php files and rename it to t_sidebar.php, then integrate the call of the top-sidebar in l_sidebar.php, change functions.php to 3 sidebars, and style the t_sidebar in style.css.

    t_sidebar.php:

    <!-- begin t_sidebar -->
    
    	<div id="t_sidebar">
    
    	<ul class="t_sidebarwidgeted">
    	<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(3) ) : else : ?>
    
    	<h2>Blogroll</h2> <!-- or anything you like, this will only show if no widget is activated in the top sidebar -->
    		<ul>
    		<?php get_links(-1, '<li>', '</li>', ' - '); ?>
    		</ul>
    
    		<?php endif; ?>
    		</ul>
    
    </div>
    <!-- end t_sidebar -->

    changes to l_sidebar.php:

    <!-- begin l_sidebar -->
    
    <?php include(TEMPLATEPATH."/t_sidebar.php");?>
    
    	<div id="l_sidebar">

    keep the rest as it is.

    changed functions.php:

    <?php
    if ( function_exists('register_sidebars') )
        register_sidebars(3);
    ?>

    style.css - add new lines formating of t_sidebar:

    /************************************************
    *	Top Sidebar 					     	    *
    ************************************************/
    
    #t_sidebar {
    	float: left;
    	width: 406px;
    	margin: 40px 0px 0px 0px;
    	padding: 0px 19px 20px 19px;
    	border-left: 1px solid #E2DDDE;
    	font:11px/18px Verdana, Arial, Helvetica, sans-serif;
    	}
    
    #t_sidebar ul {
    	list-style: none;
    	margin: 0px;
    	padding: 0px;
    	}
    
    #t_sidebar ul li {
    	background: none;
    	display: block;
    	padding: 4px 0px 4px 0px;
    	margin: 0px;
    	}
    
    #t_sidebar ul li ul li{
    	background:transparent url("images/bullet.gif") 0px 11px no-repeat; /* 0px = horizontal position for left, 6px = vertical position from top */
    	padding-left: 10px;
    	margin: 0px;
    	}
    
    #t_sidebar a:link, #l_sidebar a:visited	{ color:#444; text-decoration:none; outline:none; }
    #t_sidebar a:hover, #l_sidebar a:active	{ color:#444; text-decoration:underline; outline:none; }
    
    #t_sidebar p{
    	padding: 3px 0px 0px 0px;
    	margin: 0px;
    	line-height: 20px;
    	}
    
    #t_sidebar li {list-style: none; }

    might need fine-tuning, not tested, but nothing particularly complicated either ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic