• 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • try putting <ul> ...</ul>around your <?php get_links_list('id'); ?>

    Thread Starter asecondforever

    (@asecondforever)

    Thanks miklb. That does get rid of those XHTML errors pertaining to the link categories, but it also shrinks text size a bit in the links section and removes the bullets from the categories. (Actually, I’m not too sold on the bullets anyway, but I’d like to be able to keep them, if only to try smaller ones.) I have a feeling I need to learn a lot more. ??

    That’s all going to be styled in your CSS.

    I know you said you went through the codex, but this page might help with understanding
    https://codex.www.ads-software.com/Styling_Lists_with_CSS
    And a more comprehensive tutorial on CSS Lists
    https://css.maxdesign.com.au/listutorial/

    Thread Starter asecondforever

    (@asecondforever)

    Thanks miklb. I’ll take a look and see what I can learn.

    Thread Starter asecondforever

    (@asecondforever)

    Just as an update, I was indeed able to find the solution to the font size change in style.css, in the #sidebar ul section. And that section of the codex was helpful as was the other link. I’m not as clear on why adding the suggested code took away the bullets (thought ul usually added them) but I didn’ t want them anyway, so…

    Thanks again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How did my XHTML become invalid? (Beginner)’ is closed to new replies.