Remove Two Column From Single Post
-
I want to remove sidebar from single posts. I deleted the get_sidebar but the template hierarchy is still laying out the page as two columns… thus giving an empty sidebar container. I have twentyseventeen child theme, with sidebar enabled. (Wanted sidebar on main blog page, author, categories, etc.).
My research told me to create a single-post.php (copied from single.php in the parent) and delete the get sidebar call. Then add CSS to my child theme style.css like so:
@media screen and (min-width: 56.875em) { .single-post .content-area { float: left; margin-right: -100%; width: 100%; } }
But it isn’t working. Here’s a post sample: https://techpoet.net/wordpress-4-7-released/ but note that I’m continuing to work on this problem…
By the way, it looks like this line (parent css) is being invoked
.has-sidebar:not(.error404) #primary { float: left; width: 58%; }
I assume now that I need to add a class to css and to the template…
- The topic ‘Remove Two Column From Single Post’ is closed to new replies.