• Hi – does anyone know how to create a wide page template in twenty-eleven. I can of course do it by using css in my child themes custom.css but I used to be able to create widepage template in twenty-ten, there doesn’t seem to be anyone doing it online so thought I might ask the question here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • possibly copy page.php and save it as (for example) wide-page.php;

    add the coding to mark it as a page template;
    https://codex.www.ads-software.com/Pages#Creating_Your_Own_Page_Templates

    in custom.css add the corrsponding styles, based on the body_class .page-template-wide-page-php

    (you possibly need to create suitable ‘responsive structure’ styles as well – untested)

    Thread Starter Mark Shirley

    (@ravalde)

    Hi – Thanks for the reply

    RE: (your link) that’s the sort of thing I was doing in twenty-ten but if you look at twenty-elevens page.php its completely different from twenty-tens.

    if you look at twenty-elevens page.php its completely different from twenty-tens.

    that does not change the principle – it should work as well to start the page template with page.php of Twenty Eleven in a child theme of Twenty Eleven, as it would doing the same in Twenty Ten.

    Thread Starter Mark Shirley

    (@ravalde)

    Thanks yes I’m sure this is the case but the question was how – what would be the code because it’s structured differently its a quarter of the code of twenty-ten and seems to just call a few things. Perhaps it’s now just easier to style pages in the css than use page templates to do it. If you compare the page.php in twenty-ten and twenty-eleven you’ll see what I mean.

    how to create a wide page template in twenty-eleven.

    this is how a page template for a wide page could look like:
    https://pastebin.com/3jArvhtP
    the rest is css as alraedy suggested.
    example (depending on what you define as ‘wide’ and what part you want to have wide – this is for the full page):
    .page-template-wide-page-php #page { width: 800px; }

    Perhaps it’s now just easier to style pages in the css than use page templates to do it.

    you can do this as well;
    just use the body_class of the particular page – example .page-id-127 – in connection for instance with #page or whatever css selector is needed (use for instance firefox web developer add-on to find this for your site) to define the width of the page.

    please post a link to your site for more detailed suggestions on what styles to change.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘create a wide-page template in twenty-eleven’ is closed to new replies.