WordPress.org

Forums

Page Template breaks overall theme width (11 posts)

  1. shlinklincoln
    Member
    Posted 7 years ago #

    I created a new Page Template (Clubhouse). I pasted the EXACT same code that's on my normal Page template (page.php).

    My question is why does the Clubhouse template break the theme width? When you click on the Clubhouse page it aligns left and not center like the rest of my site.

    Did I miss a step? Does it have to do with the div classes?

    Please see

    http://shlinklincolnsports.com

    and

    http://shlinklincolnsports.com/clubhouse

    pastebin

    Thank you.

  2. shlinklincoln
    Member
    Posted 7 years ago #

    bump

  3. Marcel Brinkkemper
    Member
    Posted 7 years ago #

    A lot of errors in validating your page
    http://validator.w3.org/check?uri=http%3A%2F%2Fshlinklincolnsports.com%2Fclubhouse%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
    In pastebin it looks like you pasted the code twice??

  4. shlinklincoln
    Member
    Posted 7 years ago #

    Yeah, in the previous pastebin I posted my Page template and my Clubhouse Page template.

    Would it be easier if I just pasted my Clubhouse template?

    New pastebin

  5. Marcel Brinkkemper
    Member
    Posted 7 years ago #

    it would be easier if you corrected the errors shown on the validator page.

  6. shlinklincoln
    Member
    Posted 7 years ago #

    Thanks.

    The validator is nit picking my line breaks and such. I'm merely looking for why my page is aligning left and not center. I will look elsewhere.

  7. Marcel Brinkkemper
    Member
    Posted 7 years ago #

    The nice thing about the validator is that it could point to where you could find errors.
    one easy to spot is that there is a syntax error in a php comment.

  8. shlinklincoln
    Member
    Posted 7 years ago #

    Thanks macbrink.

    The validator is a great tool, however at this point most of it is over my head.

    Do I need to put a DOCType on every file in my admin panel? That seems to be what the validator is saying.

    Anyway my main concern is why the page template does not break form (it aligns center) but the clubhouse page (which is identical save for adding a comments template) breaks the center align. I would not doubt that it is an issue with the "<?php comments_template" however I cannot find what is wrong with the code.

    Thanks again.

  9. moshu
    Member
    Posted 7 years ago #

    From the top of your Page template:

    <php
    /*
    Template Name: Page: Clubhouse
    */
    ?>

    The first line is wrong! Missing "?"
    <?php

  10. shlinklincoln
    Member
    Posted 7 years ago #

    OMG! I'm an idiot. That did it. Thanks for your help.

  11. moshu
    Member
    Posted 7 years ago #

    You still have a bunch of validation errors... so you may expect bad display, especially due to unclosed div tags. But at least now you can see where your errors are :)
    (show soruce > revalidate > click on numbers)

Topic Closed

This topic has been closed to new replies.

About this Topic