WordPress Tip: Remove WLW and RSD Link

This post on WordPress.org’s support forum wraps it up well, but here’s the downlow about it. But specifically, the post you should read is near the end.

By default, WordPress adds two lines of code in the wp_head() function call.

<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://example.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://example.com/wp-includes/wlwmanifest.xml" />

These two lines are essentially useless to most people. The wlwmanifest.xml is the resource file needed to enable tagging support for Windows Live Writer (Windows-only).

And, well, the RSD link you don’t really need either; I’ve never used it.

What is the solution to remove these two lines?

There are two options.

First Solution

Create a plugin with the following code

<?php
/*
Plugin Name: WLW Disabler
*/
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'rsd_link');
?>

OR…

Second Solution

Add these few lines of code to your functions.php theme file

<?php
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'rsd_link');
?>


After using either of these solutions, it will eliminate the few lines of code from automatically being hooked into the wp_head() call.

WordPress SEO: Optimizing Your <title>

Often times, the <title> tag is overlooked when creating a theme. This tutorial will help you optimize the <title> tag for your specific needs.

I’m a huge fan of optimizing my <title>, but it takes some work to do it.

In any thing I create or modify, I always have a separate title.php file because I normally have 10-15 lines in the file for my <title>.

Edit: Use this to include the file: <?php include(‘title.php’); ?> in your <head> section of the header.php file.

Here is what I use,

<title><?php
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;

if(is_home()) { echo 'My News Site.'; }
elseif(is_single()) { the_title() . ' - My News Site.'; }
elseif(is_date()) { echo 'Site Archives - ' . get_the_time('M Y'); }
elseif(is_category()) { echo single_cat_title() . ' News - My Site'; }
elseif(is_page()) { the_title(); }
elseif(is_search()) { echo 'My News Site Search: ' . $s; }
elseif(is_tag()) { echo single_tag_title('My Site Tag: ',true); }
elseif(is_author()) { echo 'Site Author - ' . $curauth->display_name; }
else { echo "Sorry, page not found."; }
?></title>

Then, to simple include this file in your theme, use <?php include(‘title.php’); ?> where you would normally have the <title> and it will show up as planned.

The reason I do this for my <title>’s is because the default method used in WordPress has never been satisfactory for me. Additionally, and primarily, I have seen far better SEO results because of this.

WordPress Tip: Verifying Your WordPress.com Blog to Google Webmaster Tools

How can you verify your WordPress.com blog with Google Webmaster Tools?

Here are the steps required to make it happen:

  1. Add your site, example.wordpress.com, to your Google Webmaster Tools account.
  2. Choose the “upload an HTML file” option
  3. Write a new page (Note: Not a post, but a page)
  4. Name the page with the code that Google Webmaster Tools has provided for you to call the filename on your site. For example, google55z75fb56f079d62b.html or something along those lines — whatever the page displays to you.
  5. Next, click publish.
  6. Something to note, the page’s permalink will automaticaly strip out the .html and add a trailing slash, but that’s ok! Google’s spider will still find it.
  7. Click “verify” and Google will confirm that your file has successfully been verified

Note: if you have your pages being displayed in your theme and the google file is being displayed as a page, you have this option. Since Google rarely verifies your file to see if it’s still there, you can set it to draft or private so it’s not public. Then, if you need to verify it with Google again, simply re-publish the page and Google will verify it as yours.

If you have any questions, please feel free to post a comment about it.