WordPress Sitemap Page Without a Plugin

Plugins are great sometimes. Other times, it’s much better to just drop a few lines of code into your theme’s functions.php file to simplify things and help with performance. Here’s a relatively simple DIY WordPress sitemap complete with shortcode that’s easily dropped into any WP page. You can use the ‘exclude’ parameter to exclude specific… Read More »

Optimizing a WordPress Website for Google Page Speed Insights

A running compilation of potential fixes for issues that arise from running Google’s Page Speed Insights tool. Eliminate render-blocking JavaScript and CSS in above-the-fold content You can add this to your functions.php file to move scripts into the footer. function md_footer_enqueue_scripts() { remove_action(‘wp_head’, ‘wp_print_scripts’); remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9); remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1); } add_action(‘wp_enqueue_scripts’, ‘md_footer_enqueue_scripts’);

How To Add a Bevel and Emboss Effect To a Button With Only CSS

I know the classic bevel and emboss is a bit of a dated and heavy-handed Photoshop trick but sometimes when you’re developing a site from someone else’s design, you’ve got to go with the flow. That being said, I recently was presented with such a design and since the target audience was a little more… Read More »

WordPress Built in WP-Cron Can Cripple Your Website Performance

WordPress is great and I sing its praises all day long but that being said, it needs some help right out of the box in order to perform to its full potential. One big culprit of a slow WordPress site can be the built-in WP Cron (wp-cron.php file). WordPress cron can run a lot and… Read More »

Sharing Widgets and Content Between WordPress Multisite Blogs

WordPress Multisite is great but sharing content between blogs is a bit of a pain. Right now the only solid option is the good old switch_to_blog() function. Research tells us that this is a memory-hungry function that isn’t suitable for larger, high-traffic sites and some say not suitable for the font-end at all. That being… Read More »

Mac Mail Running Very Slow?

If you’ve been using Apple or Mac mail for years like I have you’ve probably had the same frustration that comes with a ridiculous load time for the app itself. It sometimes took 5 minutes to start up before I could actually read mail. I had archived old messages and deleted everything I could but… Read More »

Single Level Breadcrumb for WordPress

<div class=’breadcrumb’><h1><?php // if there is a parent, display the link if ( $post->post_parent ) { $parent_title = get_the_title($post->post_parent); if ( $parent_title != the_title(‘ ‘, ‘ ‘, false) ) { echo ‘<a href=’ . get_permalink($post->post_parent) . ‘ ‘ . ‘title=’ . $parent_title . ‘>’ . $parent_title . ‘</a> &raquo; ‘; } } ?> <?php the_title();… Read More »

Adding an Image or Logo to The WordPress Login Screen

The difference is in the details. Here’s an easy script to add your site’s logo to the WP login screen. This will look for a logo.png file in your theme’s images directory but you can change that to whatever you’d like. The script automatically use the site name you entered in WP as the img… Read More »

Adding a Sub Menu Select Option To WordPress Pages

Often times it’s necessary to have very granular control on sub navigation for pages. This little snippet solves that issue. It adds a metabox to WordPress pages that allows users to select from an automatically generated list of menus that have been created through the default WP Menus functionality. Add this to your functions.php file… Read More »

Using Checkboxes and Custom Meta Values With WP_Query

I had the hardest time (harder than it should have been anyway) trying to figure out how to filter my posts using WP_Query and the value of a checkbox (checked or not). As it turns out the value is “on”. See an example below of that and how to use multiple custom meta values to… Read More »

Disabling the Update Feature for WordPress Plugins

(Updated 5/11) Every now and then a WordPress plugin is close but not quite what you need. In the (usually not recommended) event that you have to hack a plugin’s logic, you’ll probably want to disable the update feature for that plugin so no one can upgrade and overwrite your changes. I take no credit… Read More »

Background Disappears In IE7-IE6

I was recently working on a project and the background was not showing up in IE7 (or IE6 but who cares about that browser?!?!). After much frustration, simply declaring the height on the element did the trick. (height: 100%; in this case). This appears to have also resolved an issue where the image-based backgrounds on… Read More »