WordPress.org

Ready to get started?Download WordPress

Forums

Blog setting overriding my page template? (2 posts)

  1. D C
    Member
    Posted 10 months ago #

    I have a few page templates for various uses (Home, Blog, Single, etc.)

    I am trying to simply remove the sidebar with one of the templates, so I load a custom stylesheet that has display:none for the sidebar on it, works great.

    My custom template page for this works perfectly, I have it setup on several pages. However, I went and applied it to the Blog page (which I do not want a sidebar on) and it doesn't work!

    Simultaneously, on two pages with the same template setting in WordPress (About and Blog) have different looks (Blog still has a sidebar, About has it properly hidden). Taking a look at the page in Firebug shows that the Blog page is still drawing from the main stylesheet while the About page is properly drawing from my other stylesheet that hides the sidebar, etc.

    If I go into General > Reading and turn off the Blog page as the main blog/posts page, the page then properly displays with no sidebar.

    There is obviously some kind of default setting within the WordPress code that messes with the ability to give a custom template if you set a page as the blog/posts page within the WordPress dashboard. Does anyone know how to turn it off or edit the page template for the Blog/posts page?

    This one really has me stumped.

  2. paulwpxp
    Font hero
    Posted 10 months ago #

    There is obviously some kind of default setting within the WordPress code that messes with the ability to give a custom template if you set a page as the blog/posts page within the WordPress dashboard.

    Yes, there is. It's called Template Hierarchy
    http://codex.wordpress.org/images/1/18/Template_Hierarchy.png

    In this case, you will have to put in that style for home.php, if not then index.php.

Reply

You must log in to post.

About this Topic