Blog

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

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…

MySQL Find/Delete WordPress Post Type

Sometimes you just need to dump all the data from a post type and start over. Sometimes you need to do a little housekeeping on the db for data you no longer need/use.   MySQL query Use with caution. Always backup your database first. Replace ‘product’ with your post type name. SELECT * FROM `wp_posts` WHERE […]

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=”http://example.com#midway-point”>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…