When you’re working with custom post types, sometimes the post title isn’t a title. It might be a person’s name, a building number, or a course code (just to take a few examples from universities). So it’s great that WordPress has a simple filter that makes it easy to customize the “Enter title here” placeholder text to make it fit your content:
WordPress Hidden Gems
Sometimes, rather than hiding a meta box via screen options altogether, I want the box to be closed until the user opens it. WordPress has a filter that lets you add box IDs to the list of things that should be closed.
The filter names are different for each post type. If you want to close a box on all post types, you’ll need to loop through them:
I love the fact that a lot of the meta boxes on the WordPress Edit screens are hidden by default. Did you know that it’s really easy to specify which boxes should be hidden? This is great if you’re building sites for clients with lots of plugins that add meta boxes, but you want new users’ administrative experience to be as simplified as possible.
The names in this array match the IDs of the meta boxes you want to hide. To find the ID, just inspect your screen.
Note that this filter affects only the screen options for new users. Anyone with an existing user account already has screen options set, and won’t receive the new default settings.
You probably know about the support forum at wordpress.org. It’s the first place to go when you need to find an answer to a question or to see if other people are experiencing the same weird problem you’ve encountered. Of course, there’s also the Codex, and, as of 3.0, the Help tabs at the top of each screen are now filled with useful, contextual information.
Where else can you go? [Read more…] about WordPress Hidden Gems: Places to Get Help
If you accidentally introduce a syntax or fatal error in one of your template files, you’ll probably see the dreaded white screen of death when you visit your home page. In some cases, even the admin screens will go blank. The best way to figure out what happened is to check your PHP error log. Look for the last error shown and try to correct it. However, if you can’t find your error log (or you don’t have one), you can turn on debugging by adding
define('WP_DEBUG', true); to your
The problem with this method, though, is that everyone who visits the site will see your errors. Joost de Valk offers this alternative, which lets you enter debug mode by adding a query string to any URL.
if ( isset($_GET['debug']) && $_GET['debug'] == 'debug') define('WP_DEBUG', true);
Then you can just add
?debug=debug to your URL (e.g.
http://mysite.com/category/news/?debug=debug) to see the errors.
The white screen of death usually comes up when you update a theme or plugin. If your theme has gone horribly wrong and you just want to switch back to another one, but you can’t access the admin screens to change it, don’t panic. Simply delete or rename your active theme’s directory. When WordPress can’t find it, it will revert to the default theme. You can also deactivate an error-causing plugin by deleting or renaming its directory. WordPress will automatically deactivate it.
Find all the WordPress Hidden Gems in [link id=”2675″]Beginning WordPress 3[/link].
Child themes are modifications of other themes. They have their own directories and you upload them just like a separate theme, but they depend on their parent themes, and they won’t work if the parent is not installed. All your modifications to the original theme will take place in the child theme, so the parent theme remains untouched—and you can update it without wiping out your changes.
Creating a child theme is the best way to modify another theme. However, they’re not all that widely known yet, partially because the WordPress Theme Directory doesn’t yet support them. [Read more…] about WordPress Hidden Gems: Child Themes