WordPress.org

Support

Support » Themes and Templates » Yoko Theme: Sidebar, extra column

Yoko Theme: Sidebar, extra column

  • I am having an issue, somewhat like others I’ve seen here with Sidebar 1 and Sidebar 2.
    I am attempting to have only 1 sidebar on the right-hand side. I’ve read elmastudio’s directions to add widgets myself and yoko will recognize this and only use my newly added widgets. This has not worked for me yet, but it is possible I am doing something wrong.

    I want to NOT have a second sidebar on the right-side, which is currently appearing on the left-side of the right-side siderbar. The unwanted siderbar contains “CATEGORIES” and “ARCHIVES”.

    You can see a screenshot of the problem in the image here:
    http://imgur.com/qc6f1

Viewing 15 replies - 1 through 15 (of 23 total)
  • I hope you find help because I have the same issue. I can tell you that she answered this question on her page and she said it is not possible at this time to remove the second sidebar. I’m not convinced that is true, but I also haven’t been able to do it LOL

    a horrible horrible fix,
    in the css do a display none on that element.

    #main #secondary {
    display: none;
    }

    a better way would be to remove it from the relevant template file.

    @bigdave2uk:

    Your fix suggestions will probably work, as you say, I would kind of like to hold out for a bit and see if someone, maybe even the creator has a solution a little less drastic.

    Thank you for the suggestions.

    @cpgnd: If a response doesn’t come soon to your liking, at least bigdave2uk has offered up a method or two.

    I too would like to have a solution to this… Where do I need to add the

    #main #secondary {
    display: none;
    }

    Many thanks!

    Scratch this comment! I found out the right spot..

    And also: How do I get the page/post to extend all the way to the right where the right sidebar begins?

    Thanks!

    in the main css style sheet. this is only recommended as a quick/nasty fix. because the element is still being loaded just not displayed.

    Really it should be removed at a template level.

    Does that help?

    Okay cool – Thanks.

    Is it possible to extend the page/post content a bit to the right to fill in the empty space that this second sidebar took up?

    Thanks!

    In order to change the existence of the second sidebar in the yoko theme you must alter the “sidebar.php” file. In that file you will find the two sidebars, one with the div id=secondary (which sits within the “main” box and uses the “sidebar-1” widget area within wordpress) and a second one with the div id=tertiary (which sits outside the main box to the right and uses the “sidebar-2” widget area). If you would like to remove any of these you could just delete the code that calls one or the other. I would recommend deleting the tertiary code.


    <div id=”tertiary” class=”widget-area” role=”complementary”>
    <?php if ( ! dynamic_sidebar( ‘sidebar-2’ ) ) : ?>

    <aside id=”search” class=”widget widget_search”>
    <?php get_search_form(); ?>
    </aside>

    <aside id=”recent-posts” class=”widget widget_recent_entries”>
    <h3 class=”widget-title”><?php _e( ‘Recent Posts’, ‘yoko’ ); ?></h3>

      <?php wp_get_archives(‘type=postbypost&limit=7’); ?>

    </aside>

    <aside id=”calendar” class=”widget widget_calendar”>
    <h3 class=”widget-title”><?php _e( ‘Calendar’, ‘yoko’ ); ?></h3>
    <?php get_calendar(true); ?>
    </aside>

    <aside id=”calendar” class=”widget widget_links”>
    <h3 class=”widget-title”><?php _e( ‘Links’, ‘yoko’ ); ?></h3>
    <ul class=”blogroll”>
    <?php wp_list_bookmarks(‘title_li=&categorize=0’); ?>

    </aside>
    <?php endif; // end sidebar 2 widget area ?>’

    I would also recommend creating a child theme with a style.css which calls to the style.css within yoko, a page.php (that is a copy of the one in yoko), and a new sidebar.php that is a copy of the one in yoko with the code above removed. This way you can always go back without having to lose anything.

    I’d like to know if anyone can help me on my problem.. I am also using the Yoko theme for a client, HawaiiTravelSolutions.com I have several PHP templates, one for this single column concept, full width, both columns, but now I need to make a three column but with the “secondary” on the left, content in center and “tertiary” on right. I created a Homepage.php template which you can see below:

    <?php
    /**
     * @package WordPress
     * @subpackage Yoko
     * Template Name: Homepage
     */
    
    get_header(); ?>
    
    <div id="wrap">
    
    	<div id="secondary" class="widget-area" role="complementary">
    		<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
    
    		<?php endif; // end sidebar 1 widget area ?>
    	</div><!-- #secondary .widget-area -->
    
    	<div id="content" width="500px">
    
    		<?php the_post(); ?>
    		<?php get_template_part( 'content', 'page' ); ?>
    
    	</div><!-- end content -->
    
    	<div id="tertiary" class="widget-area" role="complementary">
    
    		<?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
    
    		<?php endif; // end sidebar 2 widget area ?>
    
    	</div><!-- end tertiary .widget-area -->
    
    <?php get_footer(); ?>

    However, for some reason, even when I specify the width of my content container everything gets pushed over. See my problem here: http://hawaiitravelsolutions.com/?page_id=929

    Nevermind… Got it!

    I also need to make a three column layout with “secondary” on the left, content in center and “tertiary” on right.
    @yelhca07 – how did you resolve it in the end?
    I wish I could view the CSS. Should I even be tampering further with CSS or can I resolve it within PHP as above?
    Please help.

    Also: I notice that the http://hawaiitravelsolutions.com/ home page is not responsive. Would this be the result of the theme editing that produced the three column (“secondary” on left, content center, and “tertiary” right) layout, or can one still have it responsive in this way?

    Has anyone else experimented with this?

    I was making some updates when you looked at it– that’s probably why it was unresponsive. I edited the CSS & the PHP — it wasn’t the ideal way to do it, but it worked. Working only with the PHP doesn’t work. I tried it a million times.

    Quick response =D

    I mean responsive as in expanding and contracting according to view mode or screen size etc. That’s why I’m using Yoko. And I find that fixing the sidebars on either side of a main area is difficult, especially if you consider that a different position is to be specified for each screen type, as in the case of /* — iPad Landscape — */.

    It is dreadful– lol

    But basically what I had to do to get it to sit right in ALL browsers, was the specify the size and layout of the divs– so the site doesn’t move relatively with window size and the divs do indeed overlap, but the client was okay with that (they weren’t so concerned about the site going mobile, as they were about being able to see the whole thing on any screen). I can send you the files if you want to look at them.

    Something I found odd as well, was that I could call a function within the PHP without causing an odd error in the script. I had to actually pull the pieces of code out, and call them directly.

    Here’s the code for a single page:

    <?php
    /**
     * @package WordPress
     * @subpackage Yoko
     */
    
    get_header(); ?>
    
    <div id="wrap">
    <div id="main">
    	<div id="secondary" class="widget-area" role="complementary">
    		<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
    
    		<?php endif; // end sidebar 1 widget area ?>
    	</div><!-- #secondary .widget-area -->
    
    	<div id="content">
    				<?php the_post(); ?>
    
    				<?php get_template_part( 'content', 'page' ); ?>
    
    				<?php comments_template( '', true ); ?>
    
    	</div><!-- end content -->
    
    	<div id="tertiary" class="widget-area" role="complementary">
    
    		<?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
    
    		<?php endif; // end sidebar 2 widget area ?>
    
    	</div><!-- end tertiary .widget-area -->
    
    <?php get_footer(); ?>
Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Yoko Theme: Sidebar, extra column’ is closed to new replies.