How did my XHTML become invalid? (Beginner)
-
I’m a true beginner with no coding experience. But I’ve managed to get my WP site up and running, apply the Fasttrack theme, and apply a few tweaks to it. About 2 days of pouring over this forum and other sources, as well as the code in my site’s files enabled me to finally get the links organized into categories. But I then found on the w3.org validation service that my homepage had become “not Valid XHTML 1.0 Transitional.” I’ve set up a test blog, where I’m looking at this.
The last item mentioned by the validator may have been there previously, but the first three cleary appeared after I made the changes to put the links into categories.
First, here’s my test blog:
https://smalltownproject.org/wptest/wordpress/
You can click the “valid XHTML” link to see the problems.
Here’s the change I made to create the link categories:
(Edit: formatting isn’t coming out right, so I’ve trimmed down the code to the bare essentials of what I did and sort of straightened out the last line of code I pasted. If you need more, ask and I’ll work to include it.)
The original Fasttrack theme had in the “main template” (fasttrack/index.php) this code:
- <?php get_links(‘-1’, ‘
- ‘, ‘
‘, ‘ ‘); ?>
I replaced it with…
<?php get_links_list(‘id’); ?>
I also eliminated the bullet before “pages” by inserting this… (straightened out to try to get it to come out right on the forum)…
.pagenav {list-style-type: none;}
(recommended by someone on here, and two other recommendations I found in other spots didn’t work)
… at a logical looking spot (like I said – total beginner :-/ ) in the style.css template.
These things achieved the right effects, but something invalidated the XHTML.
My questions:
1) since it seemed I simply replaced a line with one found in the codex (and added a line to remove the bullet), how did the XHTML get messed up? Thoughts?
2) How do I fix it? I haven’t so far been able to find the file where this code is. (It shows up viewing page source with my browser, but not – I don’t think – in any of the files I can access in the WP admin panel. Nor have I found in in a prelimibary search of files on Plesk. I tried to look for the file in my database, but have not yet figured out how to find the code in a file in phpMyAdmin. Tips?
Thanks for any help. Apologies for the long question.
- The topic ‘How did my XHTML become invalid? (Beginner)’ is closed to new replies.