0

I'm trying to validate my wordpress site for the WCAG 2.0 AA standard, it's the first time I'm dealing with it and I have this error by the html validator.

I've search some other questions about the same error but didn't help. The error is brought up on my blog page of my Wordpress site amd actually it is been shown when I have an article posted, if I remove my post then there is no error.

I also checked through my (single) article and there is no empty paragraph in there nor any non-inline elements I noticed inside the paragraphs. I include the code of the index file as shown in Chrome's developer tools, I see that it is highly recommended not to post pictures of code but I guess that in this case it's better do it that way, if I'm wrong or if I should post any other info please tell me, thank you all for your time!

Edit: Pals, thank you all for your immediate replies, I really appreciate! So I put the code on text, now, the problem is that I don't know any way to edit this piece of code, as I stated before, this is the code that is shown in Chrome developer tools and I can't find this code in any of the php or css files of the Theme. I checked the article that causes me the error, throughout the article there is only and tags inside the . Personally I haven't put any tags, nore I noticed any... I'm sorry, I understand that I'm probably not comprehensible enough but I really can't find any other way to descirbe this... Thank you all for your patience again!

Code:

<div id="wrapper">
    <div id="contentwrapper">
        <div id="content">

<div class="post-49 post type-post status-publish format-standard hentry category-uncategorized">
        <h2 class="entry-title" id="post-49"><a f="https://badwitchstudios.gr/2020/01/21/daz-studio-blender-ue4-mixamo-tutorial/" rel="bookmark" title="DAZ STUDIO/BLENDER/UE4/MIXAMO TUTORIAL">
        DAZ STUDIO/BLENDER/UE4/MIXAMO TUTORIAL        </a></h2>
      <div class="entry">
        <p>.......</p>
<div class="belowpost">
<div class="postdate">January 21, 2020</div>
<div><a class="more-link" href="https://badwitchstudios.gr/2020/01/21/daz-studio-blender-ue4-mixamo-tutorial/">Read More</a></div>
</p></div>
      </div>
    </div>                    

        </div>
            </div>
</div>

Edit2: Ok case solved, I contacted the authors and they immediately located the error code and fixed for me, so it was a piece of code in the file extras.php, there was an extra space after '.get_the_date() function. The original code was:

function indigo_new_excerpt_more($more) { global $post; return ' '.get_the_date() .' ID)) . '">'. esc_html__('Read More', 'indigo-lite') .' '; } add_filter('excerpt_more', 'indigo_new_excerpt_more');

So I just had to remove the extra space after '.get_the_date() function and it's solved.

  • 1
    _"but I guess that in this case it's better do it that way"_ - absolutely not. Post the code, not an image. – Turnip Jan 28 '20 at 11:42
  • It should be fairly obvious that you have 3 `
    ` tags within the `

    `, but only 2 `
    `. Aside from that, you should not have ANY divs inside a paragraph according to the specification.
    – Turnip Jan 28 '20 at 11:45
  • 1
    [Please don't post screenshots](https://meta.stackoverflow.com/a/285557/1040347) of text. They can't be searched or copied and offer poor usability. And it is hard to read. Instead, paste the code as text directly into your question. – Aleksey Potapov Jan 28 '20 at 11:47

1 Answers1

1

In your code there is pretty a chaos of opening and closing HTML-tags.

I suggest you to closer analyze where you open and close a tag and what is wrapped by the tag.

The error especially thrown in line 107 is caused, because you open three <div>s within the <p> element, but you just close two of them.

So as a first improvement, add </div> before </p>.

Then please check that you use the same amount of opening and closing tags.

SteffPoint
  • 479
  • 2
  • 9
  • 24
  • Thank you my friend, as you can see in my edited post, this is the code from Chrome's developer tools and I can't edit it directly, I tried my best to locate the php file that this code corresponds but with no luck... – the_black_planet Jan 28 '20 at 18:18
  • So you didn't write the source code yourself? In DevTools you can edit source code, but it is just showing up locally on your computer, means u dont change the file on the server. You need access to the root of the code and change it there. If the code wasn't written by you, you can always report it as a bug to the one who wrote it. – SteffPoint Jan 28 '20 at 18:24
  • 1
    Thank you again SteffPoint! Yes, I didn't write any code straightaway, I just created a child theme for the theme (Indigo Lite) I'm using and edited some of the php and css files so far. So I guess I have to do as you advised me, to contact the theme developers and ask them for help. Thanks again my friend and all the guys that answered me, as soon as I have the issue solved I'll report it there, take care you all! – the_black_planet Jan 28 '20 at 18:54
  • You're welcome mate :) – SteffPoint Jan 29 '20 at 12:00