• Resolved babaiaia

    (@babaiaia)


    Hello,

    I would like to know if it’s possible to place the sidebar to the left in some pages (i.e. Shop – sidebar containing products categories etc) and to the right in some other pages (i.e. Blog – sidebar with archive, calendar, etc.).

    I know I can move them around adding #content .main {float:right;} / #content .main {float:left;} to the custom CSS form, but this affects the sidebars of all the website.

    Any solution?

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you just want to target shop archive pages use this css:

    @media (min-width: 992px) {
    body.post-type-archive-product .main.col-lg-9 {float:right;}
    }

    Kadence Themes

    Thread Starter babaiaia

    (@babaiaia)

    Thank you! That worked for the main shop page, where all my categories are listed. How can I keep the sidebar on the left also for the categories shop page?

    Thread Starter babaiaia

    (@babaiaia)

    …and in the subcategories shop pages? Basically I would need every page of the shop to have the sidebar on the right.

    The shop is so organised:

    Shop
    Cat1
    –Product
    –…
    Cat2
    –Product
    –…
    Cat3
    –SubCat3.1
    —-Product
    —-…
    –SubCat3.2
    —-Product
    —-…

    and so on.

    The above code move the sidebar on the Cat pages, but not in the SubCat ones.

    You can use this:

    @media (min-width: 992px) {
    body.tax-product_cat .main.col-lg-9 {float:right;}
    body.tax-product_tag .main.col-lg-9 {float:right;}
    }

    Kadence Themes

    Thread Starter babaiaia

    (@babaiaia)

    That worked perfectly, thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Different sidebar location for different pages?’ is closed to new replies.