
Custom fields available on one SCT site
One common annoyance that comes from managing a WordPress site that uses custom fields is the inevitable wrongly-entered custom field. This issue confounds users wherever they are directed to enter something in the Custom Fields Box. The problem is, once a custom field is saved, it is displayed as an option to all users entering a custom field — giving an ever larger group of users the option to enter the wrong field.
The erroneous custom field issue poked its head on Philadelphia Neighborhoods recently, where students were getting confused when they tried to enter a custom field used to show the author of the post. Since there was a post floating around somewhere on the site with a “byline” custom field, that options shows up in the list of custom fields to choose from, along with the correct field, “author”. I set out to find a quick solution to remove these custom field options. It turns out, to remove a custom field from the list of options, you need to find the post it is used in and delete the custom field. This can prove difficult since there is no easy way to figure out which post has the offending custom field. The custom field can be on a post in the trash, or even for a hidden post type used by a plugin, making a successful search even more hopeless. The only option around seemed to involve poking around directly in the database, which is never a good idea.
To solve this pesky problem once and for all I created a simple plugin called Delete Custom Fields. It will simply remove every instance of a custom field found on the site.
Good job Sam!
doesn’t seems to work for me. (tested it by activating it in the wordpress plugin) not by adding the code in function.php theme file
@jerome what version of WordPress are you using? I only tested it on our sites running the latest release 3.2.1 and on 3.3 betas but it got our videos working again.
#i’m using the lastest 3.2.1 and I exactly follow you 5:37pm comment…but no way..
I also tested to add the fix_vimeo function in my function.php theme file. And no success again..
one interessant information more..
if I republish the news it sounds to work…!
hum,.. How will I do for my 2500 video news..
i am using a thesis theme. Im not sure where to paste this…
T
@tielman download the plugin here: https://s3.amazonaws.com/sct/vimeo-oembed.php.zip and go to Plugins->Add New in the admin section of your site and then click upload to upload the zip file. Then activate it and you should be ok.
dude, i love you!! it works
Really? I uploaded it to my plugins and activated it. I even refreshed the page with the vimeo link. Am I missing something?
You have to go into Edit your post and click Update.
Sam,
Thanks!
Same problem here, installed he plugin but yet the pages still show http://vimeo.com/xxxxxxxx and do not get an embedded video.
Addendum: If I make a new post it does work. However, all my existing video pages are linked using the “external-videos” plugin which uses a custom post type, could that be the problem? They are still just showing the URL.
Sorry for the multiple posts. Seems the embed lookup caches its results so that the pages I had previously tested (and failed) needed to have these cache entries flushed before they would re-evaluate using the hot fix plugin. I just went into the wordpress mysql database in the postmeta table and deleted all the entries where the meta_key included _oembed_ — Hope this helps someone.
This totally fixed everything when I used the plugin, although I did have to ‘update’ all the posts featuring a vimeo embed. IF wordpress returns the oembed to what it was before will i need to remove the plugin again?
Thanks for all your help and saving of much video embedding bacon!
How did you update all the post? (Or perhaps You only have some..?) because I have to update more than 1 thousand post…
Perhaps Steve Palm, can also help me for this answer?
When I tried to install the plugin I got this error message:
Fatal error: Cannot redeclare fix_vimeo_oembed_providers() (previously declared in /home/kelli/kelmil.com/digitaldesign/wp-content/themes/blogum/functions.php:85) in /home/kelli/kelmil.com/digitaldesign/wp-content/plugins/vimeo-oembed.php_/vimeo-oembed.php on line 14
Also tried to just copy and paste the code in the functions.php file and that didn’t work either… maybe it has to do with my theme?
This error is from enabling the plugin and adding the same code in functions.php
Thanks for the comments everyone. I’ll have to look into how this oembed cache works to see if there is an easy way to correct the matter with this plugin.
Thanks Sam that worked, but I did have to update all the posts like Jonny did, not a huge deal. Thanks for the fix!
I tried embedding without the www. on WP 3.3 Beta 1 and it worked fine, so this shouldn’t be necessary in the future.
Sam,
Thanks.
Chris