WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Ie 8 not displaying custom templates properly (7 posts)

  1. mostever
    Member
    Posted 1 year ago #

    Ok, to say I was a novice coder or designer would be giving me to much credit. I am a copy and paste specialist. I put together a theme and was working with some custom templates. Everything checked out and displayed properly in ff, crome, and opera, but ie as usual is the problem child.

    Before posting my problem here I decided to see if it was simply just my coding so I activated The Tweaker3 theme
    By Arnold Goodway
    Version 1.0.5

    I have done nothing to this teme except copy the page.php file and add this
    * Template Name: tweaker3temp
    * Template tweaker3temp.php

    to the comments at the top so it will display in the templates options.

    What do you know? Ie just displays a blank screen this time. In my custom theme it would display everything, just out of alignment. I can get all pages to work fine as long as I am using the defualt template, but as soon as I try to use a custom template ie throws a wrench into things.

    Anyone else having similar problems?
    Any suggestions/solutions?

  2. mostever
    Member
    Posted 1 year ago #

    I tried looking at the code from the browser side of things, comparing both the messed up version and the correct version and the only thing I could find different is a few extra spaces at top or the comments from the template.

    Is there something WP is adding to the page when you use a template other than the default one?

  3. s_ha_dum
    Member
    Posted 1 year ago #

    The template itself-- the PHP-- is processed and sent by the server long before IE, or any other browser, gets involved. It isn't really an "IE won't use custom templates" problem. IE has no choice. It takes what the server sends. Something in the template is causing something that makes IE choke, but it is really impossible to say more without an URL.

  4. s_ha_dum
    Member
    Posted 1 year ago #

    Is there something WP is adding to the page when you use a template other than the default one?

    Not necessarily, but usually a template with call get_header() and get_footer() at least.

    My (wild) guess is that you have and encoding issue (the wrong or a mixed charset), or some invisible control characters inserted by a word processor.

  5. mostever
    Member
    Posted 1 year ago #

    Sorry for the no link. I had it there when I was writing the post......

    In any case, the link is test.trizeal.com and it is not a coding error on my part. I have done nothing to the theme at all except use a copy of the page.php file. I have changed nothing at all.

  6. s_ha_dum
    Member
    Posted 1 year ago #

    Sorry. You have changed the file and it is an error on your part. You added the "Template Name" as an HTML comment, so it gets printed before the doctype which is wrong.

    <!--
    Template Name: tweaker3temp
    -->
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    The "Template Name" needs to be inside PHP opening and closing tags, and should be a PHP comment, not inside HTML comment tags. It shouldn't echo to the browser at all.

    <?php
    /*
    Template Name: tweaker3temp
    */
    ?>
  7. mostever
    Member
    Posted 1 year ago #

    You are a superstar and I thank you for your time. As I mentioned before, I am a copy and paste guy and that is how I found some other template was the way I did that one: <!--
    Template Name: tweaker3temp
    -->

    I just forgot to remove it when I changed it to: /*
    Template Name: tweaker3temp
    */
    yesterday.

    Again, than you very much for your time. Now I can continue with my theme.

Topic Closed

This topic has been closed to new replies.

About this Topic