dating-casual
Posted in Stuff from qualitywordpress.com | No Comments »
n This Video I go over how to install and activate a wordpress theme. wordpress: wordpress.org Website techtubecentral.com Email admin@techtubecentral.com Techbytez: techbytez.net
Written by - Visit WebsitePosted in Wordpress Tutorial Videos | 5 Comments »
Following up to my previous post, I have updated the ever popular MistyLook theme to add support for Custom Menu when using WordPress 3.0 and above.
Please download the new version[MistyLook 3.8RC] and install it.
Your feedback will help make it better.
Posted in Stuff from Wpthemes.info | No Comments »
->
WordPress includes a lot of stuff through the wp_head() hook included in most themes. Most of this stuff I would consider unnecessary. A few lines of extra code in your header probably won’t slow your site down that much, but I like to keep things as clean and efficient as possible.
In this quick tip post, I’ll go over how to remove the following from being output through the wp_head hook.
Read on for the description of each of these to see if you need them or not, and how to remove them.
This is the code that displays the following code in your header:
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://example.com/xmlrpc.php?rsd" />
This is the discover mechanism used by XML-RPC clients. If you have no idea what this means and/or don’t integrate services like Flickr with your WordPress site, it’s probably safe to remove it with the following code in your theme’s functions file.
remove_action('wp_head', 'rsd_link');
This is why you see the following code in your header.
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://example.com/wp-includes/wlwmanifest.xml" />
If you don’t use Windows Live Writer, then this code is completely useless to you and should be removed.
remove_action('wp_head', 'wlwmanifest_link');
This is what displays your WordPress version number in your header.
<meta name="generator" content="WordPress 2.8.4" />
Noone really needs to know the exact version of WordPress you’re using, so it’s safe to remove this line of code.
remove_action('wp_head', 'wp_generator');
Post relational links are why this stuff is displayed on various pages.
<link rel='index' title='Main Page' href='http://www.themelab.com' />
<link rel='start' title='Article in the distant past' href='http://www.themelab.com/hello-world/' />
<link rel='prev' title='The Post Before This One' href='http://www.themelab.com/post-before/' />
<link rel='next' title='The Post After This One' href='http://www.themelab.com/post-after/' />
I have yet to find an actual reason to keep these around. Some browsers may use this code to navigate your site, although you can probably get the same effect from a well designed theme. You’ll need three lines to nuke them all.
remove_action('wp_head', 'start_post_rel_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'adjacent_posts_rel_link');
For your convenience, here’s all of them combined for easy copying and pasting into your own theme’s functions.php file.
<?php
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'start_post_rel_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'adjacent_posts_rel_link');
?>
In fact, this is the entire functions.php file I’m using on my new tweet archive theme. If you take a look at the code, the <head> tag only contains three lines: the meta charset declaration, the title tag, and the stylesheet link.
When you’re developing themes for release, be careful in removing some of these, especially the first two: XML-RPC and Windows Live Writer support.
The reason should be pretty obvious, because some of your users will likely use something like Windows Live Writer, and will come back to you asking for support when they can’t figure out why it doesn’t work with your theme.
The other items, the WordPress generator notice and post relation links, can probably be safely removed in almost any situation.
Like I said in the intro, it’s not a huge deal if you don’t remove these and I wouldn’t call this a “must” on every new WordPress site you develop. If you’re like me and don’t like useless lines of code, you’ll probably want to anyway just to keep things running as cleanly as possible.
Can you think of any other functions that you use to remove lines of unnecessary WordPress code? Let me know in the comments.
Related posts:
Posted in Theme Labs | No Comments »