How do I add a sidebar with recent posts to my single blog page?

Right now, my blog page and single blog page are full width. In the layout, In the layout/ design, I have “content left, sidebar right” checked under content layout. I really want to add a sidebar to the right with recent posts and archives. Please advise. www.shainaleis.com

Hey Nathan,

You have this code added to the style.css of the child theme which is pushing the sidebar area down on single post pages:


.x-main {
    margin-left: auto;
    margin-right: auto;
}

Try updating it to:


body:not(.single-post) .x-main {
    margin-left: auto;
    margin-right: auto;
}

Then add an HTML widget to the sidebar in Appearance > Widgets then use the recent post shortcode to have a recent post block in the widget area.

http://demo.theme.co/integrity-1/shortcodes/recent-posts/

Hope this helps.

Hi, please look at the website now. It didn’t quite work.

https://www.shainaleis.com/episode-6/

Looking forward to your response - thanks for your help.

Regards,
Nathan

Hey Nathan,

It’s because the left class was set to inherit in Pro 1.2.7.

I checked the latest version and that is not the case. The class is correctly set to float left.

Please update to the latest version of Pro. If you wish to continue with custom CSS which is not recommended because this adds unnecessary code to your site, please add this code in your Theme Options > CSS.

.x-main.left {
    float:left;
}

or simply:

.left {
    float:left;
}

Hope that helps.

Both solutions worked! Thank you.

You’re welcome!
We’re glad we were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.