• Hey folks, where do i go to fix the formatting of my posts? I run the Validate xtml file and have like 14 errors in my posts that need fixing and aren’t formatted right but don’t know where to go- what file?

Viewing 14 replies - 1 through 14 (of 14 total)
  • After you login to wordpress, click presentation and select theme editor. Then, you can edit the main index template. However, this shouldn’t be necessary because WordPress content validates as xhtml 1.0 transitional. Are you sure that you’re using the correct Doctype?

    Thread Starter Nazareth

    (@nazareth)

    Not sure what you mean by Doc type? I’m using a different theme, one that is widget ready and was listed on the main WP themes site. I only use the regular WP post function to write my posts, but some of the posts come out missing tag variables according to the xhtml validifier (I also have a couple of script errors- I’m using feedburner for my feeds & the script they give you doesn’t play nice with WP I guess)
    Now, when you say main index, that doesn’t give the posts to fix. I was wondering were to find the posts with the code in it so I could fix the doce variables in single posts?
    I dunno if you can run my site through the validifier but if so, would you mind running it to see? the site is http://sacredscoop.com Not sure why I’m getting invalid entries. I notice that when I go to post, the editor will come up and briefly right as I go into it and it will show the code in the post, but then it dissappears and I get normal text. I know some text edittors let you choose between having code or not, but can’t figure out how to make the WP one do that.

    The posts themselves are stored in the database. The theme index.php includes the code surrounding the posts, generally in a “post” or “entry” section.

    If you’re using the stupid wysiwyg when posting, it might be doing some damage too since it’s an extremely crippled way to insert posts. [And yes, I realize that’s a personal opinion – but I don’t use it, and I don’t have any problems with my posts validating….]

    Shar – I believe Nazareth is referring to editing posts, not the theme…

    To edit your posts, go to Manage > Posts and choose “edit” on the right side of the post you wish to change. And for the love of god, please stop copying and pasting into the WYSIWYG editor from another source! If you need to copy and paste, always paste into NOTEpad (not wordpad or anything else) first, then paste into the editor inside your admin.

    However looking here:
    http://validator.w3.org/check?uri=http%3A%2F%2Fsacredscoop.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&verbose=1

    You have a number of errors in your theme as well.
    When you look at this link, for the validation, the line number is actually a link showing you exactly where your error is. You’ll either have to do as Shar said and edit it that way, or better, FTP in and take the file into your editor and edit that way (you’ll get the line numbers that way) then save it and FTP it back up.

    Your doctype is declared in the header.php file, as are some of the other errors.

    Some of them will be in your sidebar.php file, while others yet will be in your index.php file.

    Just look carefully and take your time making changes. And BACK EVERYTHING UP BEFORE YOU CHANGE ANYTHING! 😉

    Thread Starter Nazareth

    (@nazareth)

    Thanks Lady, I didn’t realize copy paste was causing the problem- I write most of the stuff myself, but copy paste things like links or quotes- thanks for the tip on notepad.

    Most of what ya said is greek to me but I’ll try to figure it all out- just gonna take awhile. I’m new to all this

    How did you get that source input? That is what I’m looking for- but not sure how to get it or edit it?

    The validator gives you the option to “show source” when validating…

    As you scroll through the errors, it gives you line numbers, and when you click them, it shows you exactly the line of code that’s incorrect.

    Determining WHERE that line is can be a little tricky though, and when you get into different files and such, the line numbers don’t mean as much.

    Clean up the posts FIRST, then click the link again to revalidate… see what happens.

    Thread Starter Nazareth

    (@nazareth)

    Well that’s what I mean- where do I clean up the lines- I can’t find the coded individual posts to clean them up- All I get when I go into admin/manage themes editor are the shell codes for things like sidebar/header etc. That source code on the validifier is exactly what I’m looking for, but I can’t find it anywhere?

    Thread Starter Nazareth

    (@nazareth)

    OK I got a blog client, edditted all the errored posts, and fixed them, the only two that I have left are ‘Script” errors and I’m not sure how to fix them- I was able to fix one error by changing the cases to lower case, but still have these errors to deal with- here is the validify error messages I get

    Error Line 206 column 70: required attribute “type” not specified.
    ….xaraonline.com/xo334010AA/55E6EC1DC9C3794B.js”></script>
    The attribute given above is required for an element that you’ve used, but you have omitted it. For instance, in most HTML and XHTML document types the “type” attribute is required on the “script” element and the “alt” attribute is required for the “img” element.

    Typical values for type are type=”text/css” for <style> and type=”text/javascript” for <script>.

    ✉

    Error Line 211 column 78: required attribute “alt” not specified.
    …images/cpbannersmall03.gif” border=”0″/>

    What do I have to type in to fix them? (Note, I just stuck the code between my sidebar columns- if you visit the site, you’;ll see them on the side- one is for Xara sitemeter and other is the red one- I’m not even sure I stuck them in the right spot- as I said, all this php is new to me)

    I can show you the side bar section code here if you need to see it?

    Use pastebin to post your code, and then put the link to it here – no lengthy code in the forums…

    http://pastebin.com/

    Thread Starter Nazareth

    (@nazareth)

    Hi- I tried using that pastebin but it kept timing out on me- I’ll just post the two brief codes- not the whole ‘sidebar’ template code

    Here is the error I get:

    Error Line 209 column 70: required attribute “type” not specified.
    ….xaraonline.com/xo334010AA/55E6EC1DC9C3794B.js”></script>
    The attribute given above is required for an element that you’ve used, but you have omitted it. For instance, in most HTML and XHTML document types the “type” attribute is required on the “script” element and the “alt” attribute is required for the “img” element.

    Typical values for type are type=”text/css” for <style> and type=”text/javascript” for <script>.

    And here is the actual code- what would I do to fix it?

    <script src=”http://www.xaraonline.com/xo334010AA/55E6EC1DC9C3794B.js”></script&gt;

    The second error is:
    Line 214 column 78: required attribute “alt” not specified.
    …images/cpbannersmall03.gif” border=”0″/>

    And here is the actual code:

    <!– Begin Christian Paradise 150 x 60 Banner Link –>
    <center>

    <img src=”
    http://christianparadise.com/images/cpbannersmall03.gif&#8221; border=”0″/>
    </center>
    <!– End Christian Paradise 150 x 60 Banner Link –>

    I know I gotta stick an “alt” in there but I’m not sure where it would go or if any other stuff/attributes has to be included too?

    And btw- thank you for your patience- I’ve honestly been searchign all day on internet for answer- but don’t understand half of what I read

    For the second error – you’d have something like this:

    <img src="http://christianparadise.com/images/cpbannersmall03.gif" border=0 alt="Christian Paradise" />

    I’m not sure on the first one – I think it’s one of those things that since it’s a javascript, you need to embed it differently or call it in inside the header and pull it out where you want it… what’s the script for? Maybe we can come up with another way to do the same thing…

    Wait! I got it!

    Try this for the javascript one:

    <script src="http://www.xaraonline.com/xo334010AA/55E6EC1DC9C3794B.js" type="text/javascript"></script>

    You were missing the type="text/javascript" to tell the browser what kind of script you’re running.

    Thread Starter Nazareth

    (@nazareth)

    Lady, thank you very much- I’ll give those a try soon and report back here (Been running around like chicken with head cut off today lol) Those commands will help me in my other errors as well, as long as I have a basic idea of where and how to include missing commands. I gotta take a course in code I know, but so much going on right now- trying to get site up and running too much to do- if only there were 25 hours in each day lol

    Added: Update- fixed the first problem but then had to add qoute marks around the 0 number because I then got this error: required attribute “type” not specified.
    Workign on the first error problem now

    Added # 2: Woohoo, my first page passed authentication- thank you very much for your help and patience- Now I’ve got to tackle my other 5 pages lol, I’m finding that if I copy the error message and paste it into google, sometimes it’ll show articles that explain how to fix the problem so I won’t have to bug ya’ll (as much lol) Again, thanks for your help and advice- you fixed me front page 🙂 (I also note that when I use my blogdesk publisher (Thanks vkaryl for the suggestion to move away from WP WYSIWYG edditor) instead of the WYSIWYG in WP I get less errors- infact, haven’t got a post error yet using it-(Plus it’s more convienient to use the blogdesk)

    “I’m finding that if I copy the error message and paste it into google, sometimes it’ll show articles that explain how to fix the problem”

    Absolutely! 😀 And you’ll learn something at the same time – find sites to bookmark for future learning, and a lot more!

    Congrats on getting this far – you’ve done well, kemosabe. 😉

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘invalid xhtml’ is closed to new replies.