wordpress plugin language tagger, html cleaner and function collection

A WordPress Plugin that adds the language meta tag and the html lang tag depending on category (which allows changing it depending on the language of the post).

The Plugin also provides several small functions which clean up the html code produced by WordPress (removing unused elements and invalid html) and provides some more cool functionality.

Plugin Functionality

Language Tags

html xmlns='http://www.w3.org/1999/xhtml' dir='ltr' lang='de'

html xmlns='http://www.w3.org/1999/xhtml' dir='ltr' lang='en-US' meta http-equiv='language' content='de' meta http-equiv='language' content='en-US'

As described in my previous post about language meta tags in wordpress this plugin allows to change the language meta tag and the html lang tag depending on which category a post is in which allows to define the language tags depending on language of the post.

WordPress html code cleanup

WordPress adds a lot of stuff to the html code which is not really needed. This plugin enables you to disable the parts you do not want.

WordPress Cleanup Options:

  • remove “You may use these html tags” clutter in comment form (for SEO purposes)
  • remove worpress version meta tag (for security)
  • remove feed link in header
  • remove rel links: remove rel=next, rel=prev, rel=EditURI and rel=wlwmanifest (for speed)
  • fix category rel: rel=”category tag” is not valid html. rel=”tag” is.
  • move javascript to footer (for speed)
  • remove the inclusion of comment-reply.js (which is only used for threaded comments) (for speed)

More WordPress functions in this Plugin

Some more functionality that would not merit their own plugin but are quite nice to have.

  • remove jump from read more and change link text to continue
  • remove error messages on login screen (for security)
  • remove wpautop: wordpress automatically inserts the html p tag in your posts. if you use the Text Editor it is usefull to disable that.
  • prefix anchor links in the excerpt with link to the post. that way an anchor link of a post will work on the home page.
  • add two shortcodes: “mycloud” (tag and category cloud) and “archives” (list archives)
  • remove posts in a given category from the homepage
  • remove posts in a given category from the main feed (does not remove them from the feed for that category)
  • pagination instead of next and previous links (seriously, how is pagination not part of the standard wordpress release yet?)
  • display number of sql queries, time to render page and memory consumption for any user that can manage options (for speed analysis)

Installation of Plugin and Usage

To install this WordPress Plugin download the zip file and extract it in your WordPress /plugin directory.

Then activate the Plugin and go to the Plugin settings and activate the functionality you want.

Screenshots of Plugin Settings

wordpress plugin language tagger: settings

wordpress plugin language tagger: additional functionality settings

Download “Language Tagger and Html Cleaner” WordPress Plugin

Download the WordPress Language Tagger Plugin

Credit and Final Words

The pagination code is from kriesi.at: WordPress Pagination without plugin.

It might seem to you that the theme of these functionalities is all over the place. Well, you are right: This is a collection of all the small things I changed in my WordPress install that do not merit their own plugin. It is practical to have it all in one place.

If you have useful functionality of your own please fell free to share it in the comments!