WordPress.org

Forums

Twenty Fourteen
Blog page ignoring specified full-width template (19 posts)

  1. gruts
    Member
    Posted 1 year ago #

    I have set a static front page and selected my page named ‘Blog’ (/blog/) for my posts page.

    I have set the ‘Blog’ page's template to ‘Full Width Page’.

    Problem: The Content Sidebar still appears on all of my blog pages. In other words, the blog pages seem to be ignoring their template.

    [I have also tried creating my own full-width template specifically for the blog pages (in a child theme), but that is also ignored.]

  2. Stefan Harmsen
    Member
    Posted 1 year ago #

    The left sidebar is always displayed in this theme, as you can see here..

    Now if you'd like the content to be displayed along the full width of the (rest of) the page, you can just add this to the childtheme style.css

    .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta, .page-content {
    margin: 0 auto;
    max-width: 100%;
    }
  3. gruts
    Member
    Posted 1 year ago #

    Thanks, but I wasn't talking about the left sidebar; I was talking about the Content (i.e. right) sidebar.

    What I'm trying to do is hide the right sidebar on my blog pages.

    In selecting the full-width page template for my blog (/blog/) pages, I would expect the blog pages not to show the right sidebar (just like what happens for static pages using the full-width template). I tried to create a new page template specifically for my blog pages, but the theme seems to be ignoring whatever template I specify. Which sounds like a bug to me.

  4. gruts
    Member
    Posted 1 year ago #

    ...Thinking about it, I suppose I could achieve what I want in a child theme by making the default template (index.php) full width, then introducing another template for pages requiring the (non-full-width) right-hand sidebar. It's messy, but I'll give it a shot and report back...

  5. gruts
    Member
    Posted 1 year ago #

    ...Well, it sort of worked in that it got rid of the right sidebar, but I wouldn't make the default page look like a normal full-width page because the <body> tag's class isn't set to 'full-width' by default.

    I suppose I could then have made a whole pile of css changes involving the class body.blog, but that would be ridiculously messy.

    Any other ideas?

  6. Zulfikar Nore
    Member
    Posted 1 year ago #

    WordPress will always look for either the index.php or home.php in order to display the blog feed irrespective of what page template is selected on the editor screen.

    You could create a blog-template with a custom query but this option is riddled with a whole lot of issues - so not advised!

    The alternative is to create an option setting via the customizer and then use it with a conditional call of is_home to output the blog loop minus the sidebar. This option will still leave your single posts showing the content sidebar unless you don't want that then you'd run the above option + the conditional call on single post loop too.

    Going to try this on my theme and if it works as I hope it would then will post some of the code used as a pointer.

  7. Jasmine Malik
    Member
    Posted 1 year ago #

  8. Andrew
    Forum moderator
    Posted 1 year ago #

    @Jasmine Malik, that's now these forums work. If you need help you wait for it and don't advertise on other people's threads that you need help.

  9. Jasmine Malik
    Member
    Posted 1 year ago #

    0k :P i'm new. :) Ty ..

  10. gruts
    Member
    Posted 1 year ago #

    I suppose another alternative might be to create different sidebars for the blog and non-blog pages, to give users more control.

  11. Pete Houston
    Member
    Posted 1 year ago #

    Is it what you expect?

    .hentry {
    margin: 0 auto 48px;
    max-width: 100%;
    }

    It's used in my page, the content will expand to more space if there are more to expand, http://pcode.petehouston.com/

  12. gruts
    Member
    Posted 1 year ago #

    If you mean does that get rid of the sidebar on my /blog/ page, no.

    I'm coming round to the conclusion that keeping the right-hand sidebar on (non-full-width) pages, but removing it from my blog (posts) pages is something the Twenty Fourteen theme simply doesn't want me to do. I think this is an unfortunate constraint, but I guess I'll just have to live with it, or use another theme.

  13. Pete Houston
    Member
    Posted 1 year ago #

    I'm coming round to the conclusion that keeping the right-hand sidebar on (non-full-width) pages

    do you mean you want to remove the right sidebar to expand more space for post/page content?

  14. carpewebem
    Member
    Posted 1 year ago #

    Using for single posts the same layout as the one in the demonstration for full-width pages would be great.

    gruts, is that what you are looking for?

  15. gruts
    Member
    Posted 1 year ago #

    @Pete Houston, I'm not too bothered about making more space for content; I just want a bit less clutter on the screen when people are reading my posts. But I would like to be able to use the sidebar on the home page, search result pages, etc.

    @carpewebem, yes, exactly. As things stand, I have, unfortunately, been forced to disable the right sidebar on my entire website, just so I can have nicer-looking blog posts.

  16. Zulfikar Nore
    Member
    Posted 1 year ago #

    Just submitted a plugin that solves this issue - fourteen-extended is awaiting review at the moment.

  17. Zulfikar Nore
    Member
    Posted 1 year ago #

    The plugin is now live at http://wordpress.org/support/plugin/fourteen-extended - do let us know if it solve any or all of the issues.

    Regards,
    Zulf

  18. gruts
    Member
    Posted 1 year ago #

    Works very well. Thanks very much for your efforts.

    I suppose some people (not me) might also like the option to hide the sidebar on archive/search pages, if you're thinking of making any further improvements.

  19. Zulfikar Nore
    Member
    Posted 1 year ago #

    You are most welcome.

    Definitely - improvements will be an ongoing thing so any and all suggestions plus request are welcome :)

    Just put out a new version with option to left align the primary menu.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic