Tips, Guides, Code Snippets, Musings... Insight and perspective on all things web.

Password Protect Directory in WordPress with .htaccess file

I was having a difficult time finding information on how to password protect a directory in WordPress without it throwing a 404 not found error. After lots of searching and multiple examples across lots of other sites, here’s the short and sweet version, all in one place. Step 1: Create a file called 401.html and […]

Read More…

Change Custom Post Type Taxonomy Labels

Sometimes taxonomies for custom post types are created by themes and plugins you use on your site. Occasionally you may want to change their names to better reflect their use on your site, without changing the theme/plugin files directly. Add this code to functions.php or to a custom plugin. <?php /************************************************************** * Change Custom Post […]

Read More…

Change Custom Post Type Labels

Ever need to change the labels on a custom post type created by a theme or plugin? Want to make sure you do it without modifying the files themselves? Add this code snippet to either your functions.php file or create your own plugin with it. <?php /************************************************************** * Change Custom Post Type Labels **************************************************************/ function […]

Read More…

WordPress Revision Management Code Snippets

Revisions are a very helpful aspect of WordPress. However, over time your database can get clogged with hundreds of line items. Here’s a few handy code snippets to help manage WordPress revisions. Add these to wp-config.php Prevent WP from keeping revisions of your content: define(‘WP_POST_REVISIONS’, false) Limit how many revisions WP keeps. Change the # […]

Read More…

Anchor Name Links

Apparently there are some quirks to named anchors in various browsers. For instance, let’s say you want to link to a midway point on another page. it would looks something like this: Link on page one: <a href=””>Midway Point</a> Anchor on page 2: <a name=”midway-point”></a> This seems to work just fine in all browsers except […]

Read More…

CSS Colorado Flag

Every now and then I get an idea for a fun CSS development experiment. Not that long ago I posted one for the CSS Club as an ode to our logo. Recently, I think while taking a shower (sometimes the best thoughts come in there), I thought “Hey, know what would be cool? A Colorado state flag […]

Read More…