March 26, 2015 at 2:44 pm #6370KevGuest
I am trying to do as per the title. I currently have the frontier theme set to one left sidebar. On the homepage i have the page set to full width with no sidebar and also on my contact page etc so that there is no sidebar.
Thats all great as i just want the sidebar to show on a search page and also when the search results come up the sidebar is still there and thats all great to.
The problem that i have is that on the main Blog page that lists the blog posts I don’t want the sidebar. In the wordpress settings>reading i have the home page set to a static page (Home) and the blog page set to a page called Portfolio. Obviously going into the Portfolio page and altering its template does nothing.
As there is no blog.php or whatever WordPress uses for the default blog page it falls back to index.php for its layout and production doesn’t it??
If that is the case can i duplicate index.php and rename to blog.php and remove the sidebar area off the main post list page (in this instance the Portfolio page)?
I hope that makes sense? Could do with just a little help on how i would do that and what i need to change etc.
KevMarch 26, 2015 at 11:56 pm #6374RonKeymaster
Copy index.php onto your child-theme then rename it to home.php
Add a no-sidebars class on the new file’s content div:
<div id="content" class="no-sidebars cf">
Then remove the switch statement that calls for the sidebar on the bottom.March 27, 2015 at 12:39 am #6376KevinGuest
Many thanks for that it works as expected. So i take it i was on the right lines that the blog page defaults to using index.php if there is no actual template for the blog? I assume that now there is a home.php this is what the blog page picks up as default?
The only other thing that I would like to do is to add a few lines of text before the blog, a bit like on your blog page (is that done with a sticky post or some other way)? or do i add some things to the new home.php template file in the content section etc? I only want this text above the posts on the blog page and not every single post page.
Many thanks for your help and I do seem to be learning something :o)
KevMarch 27, 2015 at 1:15 am #6377RonKeymaster
The only other thing that I would like to do is to add a few lines of text before the blog, a bit like on your blog page
My Blog Page/Home page doesn’t have any text. Do you mean the text when you click on one of my menu items? Those are category descriptions since my menu items are links to categories.
Admin -> Posts -> Categories
If you want text in that area of your Posts Page then you can just edit your new home.php and add text there OR you could use the Before Content widget area in conjunction with Widget Logic.
- The forum ‘Frontier’ is closed to new topics and replies.