Tag Archives: PHP

How to remove WordPress’ Generator meta tag without a plugin

The “generator” meta tag can be removed with one simple line of PHP. Nice. We love WordPress. A lot. It’s amazing. But we won’t to blast out to the world our WordPress version number so that spam/malware bots will quickly find us. (They’ll still find us/you and our clients, but removing the generator tag can…

WordPress: How to enqueue jQuery from Google’s CDN without a plugin

Prefer to load jQuery from Google rather than enqueue it from WordPress’ Core? Yeah, we do too. There are many benefits to loading jQuery from Google’s CDN (Content Delivery Network): It’s likely a user previously visited a site that relied on the jQuery version your calling, which means they’ll have it cached already. If they…

Add custom CSS to WordPress Admin without a plugin

Do you want to style the WordPress Admin area without modifying WordPress core CSS files? So did we. Hacking WordPress core files is bad, because the hacks would be overwritten on the next WP update. (Son of a…!) But by placing this snippet in your theme’s functions.php file, these rules will stay intact on each…

Stop WordPress auto updates for plugins and core: no plugin needed

Just some simple code to prevent WordPress from notifying about updates for plugins or WordPress’ core. No plugin needed! We use this snippet on every site we build so that the client doesn’t auto update a plugin or the WordPress core without first testing. Updates are great, but if you don’t have a proper testing…

WordPress nav, solved: How to list child pages only for the current Parent page

Filed in:
23
2011
February

The Problem: You have a 3-tiered navigational hierarchy, like above. If you click on mainPage-a, you only want the 3 child Pages to show. But if you click to dive into Page1, you still want to show the three child Pages of mainPage-a, but also want Page1’s subpages to show, but ONLY those subpages. For…