Sidebar on specific pages

Hi,

I’d like to know if it’s possible to have the sidebar displayed only in the blogroll.

If I do it from the “customize” option, then the sidebar appears on all pages.

Is it possible to add the sidebar only to the blogroll without having it in other pages?

Thanks a lot,
Nick

Hi Nick,

I hope you are well today and thank you for your question.

You can display it on all pages then share me your blogroll page URL so that i can provide you CSS code to hide it on all other pages except blogroll page.

Best Regards,
Movin

Hi Movin,

I added the sidebar. The page is: http://www.allthingsstrength.com/blog/

Best regards,
Nick

You can try achieving this by adding the following CSS code in the Custom CSS option of the latest version of Sparkling theme on the below path.

Admin Area -> Appearance -> Customize -> Additional CSS

body:not(.blog) .main-content-inner.col-sm-12.col-md-8 {
    width: 100%;
}

body:not(.blog)  #secondary {
    display: none;
}

Hi Movin,

Thanks a lot for the support.

I added the CSS code and it works fine.

But, I have some questions more.

I don’t want the body to be 100% width, but rather the same as the Default page layout - body aligned to center and width around 60-70%.

Best regards,
Nick

To achieve that just change 100% value to 70% in the above shared code.

Hi Movin,

I know about the width.

I don’t know how to make the body (inner column) aligned to center.

Best regards,
Nick

Use below custom CSS code to centre align it.


body:not(.blog) .main-content-inner.col-sm-12.col-md-8 {
    float: none;
    margin: auto;
}

Thanks a lot, Movin!

That works perfectly!

You are most welcome here :slight_smile: