Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member MrTeapot's Avatar
    Join Date
    Nov 2011
    Posts
    127
    Member #
    30029
    Liked
    15 times
    Hello!
    I'm working on validating my wordpress site. http://validator.w3.org/ (you know the drill).

    My site is on www.skaffawebb.se

    However, I cant' get my site vaildated. I don't know what doctype to use. What doctype should wordpress themes use?

    You anyone take a look at this please?

    Thanks in advance.

    /Teapot

    EDIT:

    PHP Code:
    <?php

    /**

    * The Header for our theme.

    *

    * Displays all of the <head> section and everything up till <div id="main">

    *

    * @package WordPress

    * @subpackage Twenty_Eleven

    * @since Twenty Eleven 1.0

    */

    ?><!DOCTYPE html>

    <!--[if IE 6]>

    <html id="ie6" <?php language_attributes(); ?>>

    <![endif]-->

    <!--[if IE 7]>

    <html id="ie7" <?php language_attributes(); ?>>

    <![endif]-->

    <!--[if IE 8]>

    <html id="ie8" <?php language_attributes(); ?>>

    <![endif]-->

    <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->

    <html <?php language_attributes(); ?>>

    <!--<![endif]-->
    Copied that from twentyeleven theme. Reduced the errors and warnings a lot.
    Swedish Web Agency
    I hate that all you Americans are asleep when I'm awake...

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Start with

    http://www.w3schools.com/tags/tag_doctype.asp

    Since you aren't declaring a doc type, the validators service tries
    To guess, and they almost always guess wrong.

    Once you put that in place, the validator is telling you you need to define and encoding type and they give examples for it.

  4. #3
    Senior Member MrTeapot's Avatar
    Join Date
    Nov 2011
    Posts
    127
    Member #
    30029
    Liked
    15 times
    I don't know what doctype to use actually. Get tons of errors with some of them. For some reason it automatically detected a page as HTML5. That didn't generate as many errors as the other doctypes..

    Any idea? any recommendations for wordpress themes?

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

    That doctype generates almost as few errors as HTML5. Will use it. Now, back to getting it validated...

    Many errors seem to be due to plugins and stuff? Doesn't plugins have to generate valid code to get accepted or something?

    EDIT2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
    That one, generates only 3 errors. Is it recommended to use it?
    Swedish Web Agency
    I hate that all you Americans are asleep when I'm awake...

  5. #4
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    If you notice html5 is beta...

    Since I'm not actually seeing the errors I have no idea, but that's the point of the validation service. Every error they flag, they give an explanation of and tell you where in the code the errors are.

  6. #5
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Try not to put too much stake in validators. They miss the mark a lot, and you'll spend a lot of time trying to fix problems that don't exist. They work great for troubleshooting, but really that's it. Just because your page doesn't validate doesn't mean it isn't valid, especially with a CMS.
    AlphaMare likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:40 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com