Really. There are a lot of WordPress resources out there, with fancy tutorials and snippets and thingamajigs, but 99% of my questions are answered in one of the above 2 sites.
Once I’ve got piece of code working the way I want, I save it so I can refer to it later. I’m working on consolidating all my working code snippets, but for now they can be found on this site, or in github gists (as well as in some of my plugins). Some are still in the mu-plugins folder of my local development site, I’m working on getting those cleaned up and online.Tag Archives: wordpress
Including Custom Fields Inside Your Post
WordPress/TinyMCE will sometimes remove code that you’d rather it not. For example, have you have tried to add a Google Map to a post without the aid of a plugin? You can’t. The iframes aren’t allowed.
Because of this, and a few other similar instances, I wrote a plugin that would let me easily bypass this filters. Continue reading
Swap Color Schemes When in the Network Admin
In WordPress 3.1, the network-wide options being moved to their own area in WordPress to make it easier on network administrators.
To take a just a bit further, I put together this script that will switch color schemes when you’re in the Network Admin.
Confirm Email Address
If you’re running a WordPress network, and depending on how you’re using it, you may need to get users to confirm or update their email address.
In my situation, I build a lot of sites for clients, and during development I use an email address of my own so they don’t get bombarded with emails they don’t need. But I don’t always change it back when I’m done, or maybe there’s a typo. Or maybe it’s the client that has changed their email address.
Whatever the cause, sometimes these things just need to be double-checked and confirmed. So here’s a small plugin that can be dropped in your mu-plugins folder:
Remove WordPress Plugin Update Count From the Menu
My office has a big WordPress multisite installation, so we are careful about updating plugins. As a result, there are ofter a number of plugins begging to be updated. It was getting annoying to see that all the time, so this little snippet gets rid of the notice. Continue reading
Customize WordPress “Favorites” Menu
Toss this into your functions.php file to add or remove items from the favorites menu (dropdown by Howdy greeting) in WordPress. Continue reading
Change Search Engines Blocked text in WordPress
Changes “Search Engines Blocked” to some other text, in this case “Privacy Mode Enabled.” Just put this in your function.php file. Continue reading
Add more Date/Time Format options to WordPress
If you often customize the date/time formats in WordPress, this might be useful. Just put into your functions.php file and your new formats will be added to the list. Continue reading
Updating Permalink Structure from a Plugin
If you need to update/re-save the permalink structure from within your plugin, here’s how:
Add WYSIWYG controls to a particular custom field
Notes
As of WordPress 3.2, this implementation can be finicky – mostly an issue with inserting images into the right editor.
However, WordPress 3.3 (as of this note, is in beta 2) in getting an Editor API which will make adding 2nd (and 3rd…) editors to a single page much more reliable. If you don’t see me post an update by the end of the year – 3.3 has a tentative release date of sometime near the end of November 2011 – ping me here or on twitter @trepmal.
Download
I work with a lot of less-than-tech-savvy people. Explaining how to use custom fields on their WordPress site is scary for both of us…
So I’ve been working on this plugin, this is definitely still rough around the edges, so if you spot any major issues, please let me know. Continue reading