April 22, 2014

Textual description of firstImageUrl

How To Fix There Is No Attribute "DisplayText" For Share This Button

|
Are you one of those who are having invalid XHTML markup problem with your Share This button.

You tried to fix it and you get remarks like, there is no attribute "displayText" or Attribute displaytext not allowed on element span?

I have tried searching all over various forums and help sites  for solution.

I couldn't understand what they are saying. It is all muddled with technical jargon like element style, span and attribute.

How To Fix  There Is No Attribute "DisplayText"

I know they are using the correct and proper terms. But for people like me who are technical-challenged, it is useless to me.

Anyway, I managed to get solved this invalid markup problem.

Here is a simple trick on how to resolve or fix the social sharing button Share It to get it valid in Markup Validation service like W3C.

1. Go to WordPress Dashboard.

2. Click Appearance.

3. Click on Editor.

4. Select Main Index Template (index.php)

5. Look for this code:

<span class='st_sharethis_large' displayText='ShareThis'></span>
<span class='st_facebook_large' displayText='Facebook'></span>
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_linkedin_large' displayText='LinkedIn'></span>
<span class='st_pinterest_large' displayText='Pinterest'></span>
<span class='st_email_large' displayText='Email'></span>
6. Change it to this:

<span class='st_sharethis_large'></span>
<span class='st_facebook_large'></span>
<span class='st_twitter_large'></span>
<span class='st_linkedin_large'></span>
<span class='st_pinterest_large'></span>
<span class='st_email_large'></span>
7. Click Update File button.

8. Now check it with markup validator at: W3C