WordPress.org

Ready to get started?Download WordPress

Forums

Still struggling to understand how to create a different front page layout (5 posts)

  1. Jon W
    Member
    Posted 2 years ago #

    Been searching the forums, but still confused. Read this: http://codex.wordpress.org/Pages#Page_Templates - still confused.

    My blog theme is a 3 column one, 2 180px side bars, a header section with logo, search box, nav menu.

    For the home page I want something totally different, such as 2 wide columns only, same header. But I do not understand how to do this as using the separate page calls up header.php which sets the CSS and the sidebars cannot be moved (they can be removed).

    So, confused. If anyone knows of step by step tutorial please let me know - I am sure there is one out there somewhere!

  2. What you want to do is duplicate your page.php or index.php insert the template comment at the top and save the file at custom-page.php or something like that.

    It is true that the page will call the same header and footer, but the main body can be altered by changing the divs.

    I'm not sure what your theme has for css, but if for example it has the following id: content, sidebar and right-sidebar, you could change your content to content-wide.

    In the css, you can then create a new id called #content-wide and make this div wider.

    Without seeing your site it's hard to provide clearer instructions.

  3. Jon W
    Member
    Posted 2 years ago #

    Ah, I think I am starting to understand... my site is MotleyHealth.com and it will be the homepage and category pages that will have a new look. It uses the Bombax theme.

    Page looks like this:

    [code moderated according to forum rules - please use the pastebin]

    I have already created a static homepage with/* Template Name: Home Page */

    The width of the sidebars are set in the theme admin pages, so guessing that I will need to create different sidebar files / entries into the includes/layout.php, which looks like this (sorry, this is big!):

    [dito]

    Do not need to set the new layout CSS in the admin panel, happy to have a new css file or add it to one of the many in there (style.css, css/default.css, css/sea.css), I generally pop all my extras in style.css.

    Ant pointers would be much appreciated.

    Many thanks,

    Jon.

  4. Jon W
    Member
    Posted 2 years ago #

    Of course, if you think I would be better off starting with a new theme (but keeping the same layout and feel) then let me know, as I do seem to have spent a lot of time tinkering so far!

  5. Jon W
    Member
    Posted 2 years ago #

    Just happened to notice the Guardian homepage, this is really how I would like mine to be laid out. http://www.guardian.co.uk/

    I have seen some themes that do different home pages and post pages quite well, maybe I should find a suitable one to hack?

Topic Closed

This topic has been closed to new replies.

About this Topic