Hi everyone,
First, I just recently also came across this problem. I found kex’s solution worked best for me, though I implemented it differently. I am using 2.0.5.
Here’s my fix:
1. open /wp-admin/admin-functions.php
2. in that file search for the phrase “$keys as $key”
that should bring you to code that looks like:
foreach ($keys as $key) {
$key = wp_specialchars($key, 1);
echo "nt<option value='$key'>$key</option>";
}
3. Replace the code above with this code:
foreach ($keys as $key) {
$key = wp_specialchars($key, 1);
if (substr($key, 0,1) != '_' ) {
echo "nt<option value='$key'>$key</option>";
}
}
If the first character of the custom field isn’t an underscore, it gets displayed, otherwise it doesn’t.
Second, if you’d like to display all your custom fields at one time, rather than the most recent 10, do the following
1. Open up that same file as in step one above
2. Find this code
$keys = $wpdb->get_col("
SELECT meta_key
FROM $wpdb->postmeta
GROUP BY meta_key
ORDER BY meta_id DESC
LIMIT 10");
3. Replace the number 10 with a number that accomodates your additional fields. It’s probably a good idea to go with your custom fields rounded up a little rather than something arbitrarily large since this is hitting your database.
That’s all…hope that helped someone!
Jen