WordPress.org

Ready to get started?Download WordPress

Forums

Clean Yeti Basic
[resolved] How to customize sidebar width? (7 posts)

  1. Daedalon
    Member
    Posted 7 months ago #

    We want a sidebar that is not large-4. Almost all of the features of this theme are easily overrideable by a child theme by actions or replacer functions. Neither are available for cleanyetibasic_sidebar(), so the next best option seems to be to disable the default sidebar and re-add a customized one in cleanyetibasic_belowcontainer().

    Could a similar way to override cleanyetibasic_sidebar() be added as almost all other functions have, e.g. either by adding a direct support for an override function in the same way as cleanyetibasic_body() has, or at least giving it its own action? Thanks!

  2. Daedalon
    Member
    Posted 7 months ago #

    From theme author in http://wordpress.org/support/topic/serene-themes-support?replies=4#post-5115244:

    Changing Widths:
    My best advice is to use the following css to change widths of the sidebar and main content area. Just add it to syle.css in your child theme

    @media only screen and (min-width: 64.063em) {
      #container.large-8 {
        width: 75%; /* your custom percentage */
      }
    
      #main .large-4 {
        width: 25%; /* your custom percentage */
      }
    }
  3. Daedalon
    Member
    Posted 7 months ago #

    Richard: Wouldn't altering the division of columns to 9 and 3 be more in accordance with the Foundation way? Or is there some reason why sticking to 8 and 4 columns is more advisable?

  4. Richard LaFranchi
    Member
    Theme Author

    Posted 7 months ago #

    line 207 of widgets-extensions.php handles the code for the main container

    function cleanyetibasic_container()

    It basically changes the width from large-8 to large-12 based on whether or not the full-width page template is chosen or if the sidebar is active.
    I figured using css would be an easier way around than editing the files.

    you would also have to edit sidebar-extensions.php

    Also found a good link on overwriting functions in your childtheme here:
    http://venutip.com/content/right-way-override-theme-functions

    so you could do something like

    function remove_container() {
       remove_action( 'cleanyetibasic_abovecontent', 'cleanyetibasic_container', 1 );
    }
    add_action( 'init', 'remove_conatiner' );
    
    function childtheme_container() {
       ...
    }
    add_action( 'cleanyetibasic_abovecontent', 'childtheme_container', 1);
  5. Richard LaFranchi
    Member
    Theme Author

    Posted 7 months ago #

    I justed realized this won't work with cleanyetibasic_sidebar()
    I'll revise the code so that it the opening element for the sidebar uses an action.

  6. Daedalon
    Member
    Posted 7 months ago #

  7. Daedalon
    Member
    Posted 6 months ago #

    Works like a treat in 2.0.3:

    // Add custom sidebar
    function my_sidebar_open( $open ) {
        $open = '<div class="large-3 columns">';
    //    echo apply_filters('cleanyetibasic_sidebar_open', $open);
        return $open;
    }
    add_filter( 'cleanyetibasic_sidebar_open', 'my_sidebar_open', 1);

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.