Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #19606

    I am trying to disable the sidebar on http://hackerwarehouse.com/shop/ yet keep the sidebar on category pages such as http://hackerwarehouse.com/product-category/physical-hacking/.

    If I edit the ‘shop’ page and change the ‘Overwrite default Post Layout’ to fullsize, it still displays the sidebar. But even if this worked, it wouldn’t allow me to have what I am looking for, which is no sidebar on the main shop area, and sidebars on the category pages, which use the shop page (at least that is how I understand it).

    I am new to replete, so I am not sure which configuration files I should be tweaking. I looked in functions.php, sidebar.php, and config-woocommece/config.php. Suggestions?

    #104299

    Hi,

    Ok to get that change done, Please open the file config.php inside config-woocommerce folder located within the replete theme directory and locate line 480-482 which look like `

    //get the sidebar
    if(!is_singular())
    get_sidebar();

    and replace them with one of the two choices below depending what you want:(choice 1 has a php block and a css block, which choice 2 has no css component)

    Choice 1) No sidebar on main shop page and have sidebar on product category (what the original person was asking for)

    //get the sidebar
    if(!is_singular() && !is_shop() || is_product_category() )
    get_sidebar();

    and finally add the css below to the end of your custom.css file OR you could add it to the very end of the Quick CSS. which is located in the Admin > Replete > Theme Options > Style .. the text area at the bottom of the page.

    #top.post-type-archive-product .nine.units {
    width: 1050px;
    }


    Choice 2) No Sidebar on Main Shop Page and No SIdebar on Category Pages

    //get the sidebar
    if(!is_singular() && !is_shop() || !is_product_category() )
    get_sidebar();

    Thanks,

    Nick

    #104300

    Hi Nick,

    I am also trying to figure this out and I tried what you say above and it does not do anything?

    #104301

    Hi zzalienzz,

    If you made the change to those files to the Replete theme files on your server it should take effect. Make sure you are also not using any kind of cacheing plugin that would be showing you old versions of your site files.

    Regards,

    Devin

    #104302

    Hi Devin,

    here is a link to the site…its not working and I have emptied the cache…

    http://www.silverlakecookie.com/wp/product-category/year-round/

    done exactly whats above..

    #104303

    Hi,

    The original person asked to have NO Sidebar on the main shop page and HAVE sidebars on category pages. I posted the answer which you said doesn’t work.

    You main shop page has NO sidebar ( http://www.silverlakecookie.com/wp/shop/ ) and your Category pages HAVE a sidebar ( http://www.silverlakecookie.com/wp/product-category/year-round/ ) so I fail to see how my code doesn’t work. Please explain. If you wanted a different combination than the original support request, I expanded my answer to include (variation 1) no sidebar shop main page, no sidebar categories; and (variation 2) no sidebar main shop page, have sidebar categories

    Off topic but

    By the way, you have errors coming from invalid javascript embedded close to the top of your page …

    <script type="text/javascript">

    var iconName = Silver Lake
    if( navigator.userAgent.match(/iPhone/i) ||
    navigator.userAgent.match(/iPod/i) ||
    navigator.userAgent.match(/iPad/i)
    ) {
    document.title = "Silver Lake";
    }
    </script>

    You need to change the 3rd line to look like this

    var iconName = 'Silver Lake';

    Thanks,

    Nick

    #104304

    HI NIck,

    sorry for the confusion, you are correct…so let me re-say my question, i do not want any side bars on any of the product category pages, can that be done? also, i have moved the site to the main directory http://www.silverlakecookie.com

    thanks for the java error…let me know if its still there.


    oh, wait I see you answered it above, let me try..


    ok, tried choice 2, edited the config file and took off the css and still no go…can you please see whats going wrong??!

    http://www.silverlakecookie.com/product-category/year-round/bulk-european/

    #104305

    You can try following css code – add it to css/custom.css or the quick css field:

    @media only screen and (min-width: 100px){

    .responsive .archive.woocommerce .container .template-shop.nine.units{
    width: 100% !important;
    }

    .responsive .archive.woocommerce .container .sidebar.three.units{
    display: none !important;
    }
    }

    #104306

    ok, this worked pretty good, take a look

    http://www.silverlakecookie.com/product-category/year-round/

    BUT, the sidebar content is not showing below everything??! how do i get rid of that?

    #104307

    Hey!

    Sorry, I corrected the code – please try it again :)

    Best regards,

    Peter

    #104308

    @Nick and @Dude: Thank you both for the code snips. You answered my question perfectly. Thanks again :) Cheers.

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

The topic ‘Disable sidebar for shop page, keep sidebar for product categories’ is closed to new replies.