I am doing some much needed site optimisation and will update this page as I make changes to my site.
I’ve just changed from using “All-in-one SEO”, which is still a better option than the standard WordPress install but does not allow the level of functionality that “Headspace2” does. Headspace2 does need a little getting your head around, it does not come tweaked out the box and needs more setting up than “All-in-one”.
Headspace2 Settings
Settings » Headspace » Page Settings
Global Settings – %%title%% | %%sitename%%
Categories – %%category%% Archives %%page%% | %%sitename%%
Posts – %%title%% | %%sitename%%
Pages – %%title%% | %%sitename%%
Search Pages – “%%searchphrase%%” search results | %%sitename%%
404 Page – Sorry, nothing found for %%request_words%%
You can change these to suite your preferences.
Why is my title not changing or displaying properly?
You need to make sure your theme calls the wp_title
function. Any text either side of this function will always appear in your title regardless of what you tell HeadSpace2 to use.
I had to change the header.php file in my Tarski Theme from
<title><?php echo tarski_doctitle(); ?></title>
to
<title><?php wp_title (''); ?></title>
How to customize more text
Step 1
Goto Settings » Headspace » Page Modules
Drag the “More text” from the Disabled box to the Simple box. Then click edit, change the Replace text from class="more-link">$1</a>
to something like class="more-link">Read more on $1 »</a>
Step 2
Take you latest post and edit it, find the Headspace section below your text window, edit the “More text:” with something like “Optimising Your Site” then “Update Post”. Now your More Text should say “Read more on Optimising Your Site.
Further customising the more text
That’s a much better SEO solution than “Read the rest of this entry”.
In order to improve it one more step, do you know of a way so that only the page title is used as the link anchor text?
So, for example, if I had a post titled “Optimising Your WordPress Site” and I wanted that to be the only part of the text that is hyperlinked (e.g. “Read more on Optimising Your WordPress Site“), what would be the correct syntax in HeadSpace2?
Step 1
Goto Settings » Headspace » Page Modules
Drag the “More text” from the Disabled box to the Simple box. Then click edit, change the Replace text from class="more-link">$1</a>
to something like class="more-link">$1 »</a>
or leave it as the default.
Step 2
Modfiy the post-template.php (called template-functions-post.php pre WordPress 2.8) file in your wp-includes directory. i.e. wp-includes/post-template.php
find
$output .= apply_filters( 'the_content_more_link', '
and replace with
$output .= apply_filters( 'the_content_more_link', ' Read more on
where “Read more on ” is the text you want to appear before the link to your full post.
Why is my Google Analytics code not appearing?
To enable Headspace’s Google Analytics tracking code, goto Settings » Headspace » Site Modules, select the check box next to Google Analytics. Edit the settings by clicking the edit button on the right.
Make sure you setup under “Who to track” to track Administrators, so you can see the code being generated on your site pages. If it is working you can set Google Analytics to not track Administrators or Editors, whatever makes the most sense for your site.
Your theme must use the wp_footer
function in footer.php
. Most themes do, but if yours doesn’t, you’ll need to and add wp_footer
just before the </body>
element:
This is done under Appearance > Editor, select the Main Index Page (index.php) and add
<?php wp_footer(); ?> </body> </html>
Ensuring Link Juice
Do you want to make sure you can change your permalinks and not lose any traffic? Get Redirection which like “Headspace” is developed by the good folk at UrbanGiraffe.com.
It is brilliant and keeping track of the posts and pages you modify and making sure it redirects your incoming traffic from the old to the new pages with a 301 redirect.
Goto Tools » Redirection » Options, ensure that the URL Monitoring select box is set to “Modified posts” and check “Monitor new posts”. You will now have perfectly optimized permalinks without having to do anything else, or worry about duplicate content issues or 404 errors that could lead to search engine penalties.
Inspired by: Yoast’s great article on WordPress SEO