Blog

When you first install the Thesis theme you will notice that it places the navigation menu above the header by default. In many cases you will want this to appear below the header instead and as such you can use the following code can be used to move the Thesis navigation from it’s current hook to one to just below your header images etc.

Note: Like all thesis function snippets you can simply copy and paste this code into the Custom File Editor in your dashboard. You should place this code in your custom_functions.php file.

/* Move Thesis Navigation Below Header */
remove_action('thesis_hook_before_header' , 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');

I hope you enjoy this snippet!

You may or may not have heard that a recent security flaw was discovered in the TimThumb script which many WordPress themes use to generate thumbnails. This was a serious flaw that simply couldn’t be ignored and as such we have made a collection of some of the most popular theme developers responses to the situation so you can know whether your theme was affected and if you need to update.

Whilst this is just a small section of the theme market you should be aware that many hundreds of themes have been using the TimThumb script so if you are not sure whether your theme contains the code or you know that it does but aren’t sure whether it’s been updated then you can contact the theme developer and point them to the new and improved TimThumb 2.0 script that addresses the vulnerability as well as adding some extra functionality.

I would only recommend that Advanced & Expert users use these snippets!

This small collection of .htaccess code snippets are things that I’ve picked up over my time on the web for very specific uses. The .htaccess file is very dangerous to the wbesites health f you do anything wrong so I highly recommend that you fully backup everything before starting to use any of this code.

1. To Remove the generic /category/ slug in your category URLs

RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]
Source: How to: Remove /category/ from your WordPress url

2. Stop Spammers in their Tracks with Comment Deny for No Referrers

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourblog.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]

Source: How to: Deny comment posting to no referrer requests

3. Ban Spammers from your site when you know their IP address

order allow,deny
deny from 200.49.176.139
allow from all

Source: Banning a WordPress Spammer With .htaccess

If you’ve ever used the Thesis theme you will have seen that it adds a small credit link to the bottom of your websites page design. Whilst this is great for Chris Pearson and his team in terms of free backlinks, generally speaking most professional users and non tech companies would like to be able to remove this small advert from their site so here is the code to do it.

Note: Like all thesis snippets you can simply copy and paste this code into the Custom File Editor in your dashboard. You should place this code in your custom_functions.php file.

/* Remove Thesis Attribution Link (Developer License Holders Only) */
remove_action('thesis_hook_footer', 'thesis_attribution');

I hope you enjoy this snippet!

Recently Matt Mullenweg hosted his annual “State of the Word” address at WordCamp in San Francisco. During his presentation he released several really interesting statistics sourced from around the web and the first ever extensive WordPress user survey. You can catch a few of the most exciting WordPress Statistics here and there will be more released in the coming weeks.

“In every one hundred new sites being built 22 of those are using WordPress”

“The average hourly wage for a WordPress professional is $50″

“14.7% of the top million websites in the world use WordPress”

These are some pretty interesting statistics and I’m sure there will only be more interesting revelations when the full WordPress survey results are released to the public. If there is one thing that is clear from this it’s that there is some big business built around WordPress and huge opportunities for those that know how to work with it.