Removing Sidebar from Posts Page

editing content.php but i cannot fathom how to get rid of the sidebar, even though i have added content.php to the config file - does anyone have an answer?

If your “Latest Posts” page is set as your posts page in the reading settings then it is most likely using index.php

You could also just install What The File to be sure

its definitely using content.php. as im editing that page and the changes are reflecting on my posts page… just can’t seem to get the sidebar off it.

Add is_home to the first array and you should be fine. If you want to know why your check for content.php isn’t working, re-read my post on the Roots Sidebar or skip to the sentence under the Second Array example code.

1 Like

thats working now thank you - but for some reason, content.php shows my posts, but it is getting the page title and displaying it twice.
now if i take all the code out of the page template, i still get the page header, which indicates its coming from somewhere else - like the base file, but why is that only happening on content.php? I can’t find anyway to remove it.

Ok, Ive just realised its using page.php and that content.php was a template part. - that answers a lot!

Hm, looks like you have changed your question from what was originally posted, but I am glad you figured it out.

really sorry @enollo I did reword it the first part was kind of redundant after I asked it!