Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #928

    Is it posible to have ONE sidebar for the Home/Front page and all the other pages with TWO sidebars?

    #33399

    Short answer NO

    Long answer yes but would require you to make a lot of modifications as I believe the code restrict you to only wide, 1 or 2 columns with one choice for the whole site. I suppose you need to create new templates…is that right James? More flexibility is always better

    #33400

    I think this can be easilky achieved by replacing following code in sidebar.php

    if($k_option['includes']['sidebarCount'] != 2) $sidebarSize = ' fullwidth_sidebar';

    with:

    if($k_option['includes']['sidebarCount'] != 2 || is_home()) $sidebarSize = ' fullwidth_sidebar';

    So you get fullwidth sidebar IF you have activate only one sidebar in options menu OR if you’re on your homepage.

    In your options menu you need to activate 2 sidebars to make this solution work.

    @Monsoon: Another template wouldn’t help because the sidebar.php is called via get_sidebar – you would need to copy and paste the sidebar.php code to your new template and remove get_sidebar function.

    The Dude

    #33401

    Thanx!

    #33402

    Sweet thank Dude.

    Now lets up the ante…what if you want to assign a different sidebar to posts or pages? Lets say 2 sidebars on the homepage and on back pages being able to chose between one large, one medium or two small sidebars. I know I would love to have that on my pages… more flexibility. Higher level pages get 2 sidebars, one level down they get a medium sidebar and 3 level down thy get a single small sidebar.

    I am still trying to make that work but that amount of flexibility would kick ass

    #33403

    It’s easily possible – you replace the get_sidebar() function in your template.php with the code of sidebar.php and afterwards you change it to your requirements. It’s a more flexible solution as you pointed out above but obviously a more complex one.

    The Dude

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Home with one sidebar, others with two’ is closed to new replies.