Blog Archives

How does WordPress redirect mistyped URLs to the correct one?

Well, I’m not sure exactly because it is A LOT of code, but to make it stop, you can use the filter ‘redirect_canonical’ and return false.  like so: So say you have a post named “mission” at http://mydomain.com/mission, but for

Tagged with: ,
Posted in Coding

Google Analytics Measurement Protocol for Subscriptions

Send Analytics Data Directly From Your Server Google Analytics Measurement Protocol is available for Google’s Universal Analytics.  It was released in the first part of 2013 and is as of this writing still in public beta.  It allows developers to

Tagged with: , , , , ,
Posted in Coding

Free Web Hosting

Today I realized I needed a reliable web host that I can use for development purposes.  Either for demoing to clients or testing things out, it needed to be online, free (because I wouldn’t use it for production), and not

Tagged with: ,
Posted in Server Stuff

Easy WordPress Localization

If you want to localize a plugin or theme or even just change some wording around, or if you are starting from scratch the easiest thing to do is install the Codestyle Localization plugin. If starting from scratch, just  make

Tagged with: , ,
Posted in Coding, Off the Shelf, Tools

WP_Query and posts_per_page

Problem The following code does not seem to limit the posts to 3 posts.  Instead uses the wordpress setting of 10 posts: // The Query $the_query = new WP_Query( array( ‘nopaging’ => true, ‘posts_per_page’ => 3, ‘post_type’ => ‘post’ )

Tagged with: ,
Posted in Coding

WordPress Maintenance Page

If you’ve updated WordPress, you should have noticed that wordpress goes into “maintenance mode” whenever mass plugins or WordPress itself is updated.  What if you wanted to do some manual upgrading?  Then you can manually put wordpress into maintenance mode.

Tagged with: ,
Posted in Coding

Online Tools

All tools listed here are free and ready to use. CSS Gradient Generator Great for creating gradients, even in IE: http://www.colorzilla.com/gradient-editor/ Image Editor Great for an alternative to Photoshop or even Gimp if you don’t have anything installed: http://pixlr.com/editor/ Test

Tagged with: , , ,
Posted in Server Stuff, Tools

WordPress Cron

A great way to take more control of your wp-cron and also slightly speed up wordpress is to disable cron and scheduled a cron job on your server to run wp-cron.php.  You just need a server that supports cron jobs.

Tagged with: , , ,
Posted in Coding, Server Stuff

Hardening WordPress

I’ll be updating this post as I find more and better explanations to hardening wordpress.  The more secure, the better.  Some things to keep in mind when you are trying to secure your wordpress installation. Be careful when saying a

Tagged with: , ,
Posted in Coding, Server Stuff

How to use your own template for specific times

There’s a great post on how to get WordPress to use your own template and override the default template. The basic code looks like this; function my_template() { if (is_category() && get_query_var(‘cat’) == get_cat_id(‘fun’)) { include (TEMPLATEPATH . ‘/category-fun.php’); exit;

Tagged with: ,
Posted in Coding