One thing I find with Wordpress is that with each plugin you add, you have extra hours involved in making the code XHTML compliant. I still have yet to find a way around the YouTube video ad code problem that I mentioned in a previous post. Sigh. This time around I added a plugin to a few of my sites for Buzzfeed and sure enough…there were compliance issues.

First of all, the CSS styles for the images get located into the page code in the same place where Buzzfeed shows up. This causes a problem so I copied and pasted the styles into my own style sheet and then deleted that section from the template.php file located in the plugin folder. The next problem I ran into had to do with the item titles. If a Buzzfeed item was called “Jim’s Computer,” then the Alt tag for the image would go all screwy. This is because they used apostrophes all through the PHP plugin echo code.

Again you want to edit the same template.php file and look for the following section in the 3rd echo set:

You want to change this to the following and then don’t close the file yet. We won’t be done.

Notice I only changed the apostrophes to a \” on each side, but now it will work fine. If a feed item is “Jim’s Computer” then it won’t be a problem.

The final step is to find the “BuzzFeed” link at the top of this entire block of code and the “Add To Your Site” at the bottom. They forgot to add the closing anchor tags on these links which also screws up the compliance. Put them in right after the text I quoted above and then save the file and upload. Your site should be compliant now. Cheers!

Popularity of this post: 57%

Category Flagged: Site Updates