So many strange entries in Custom Fields drop down & it affects me posting …
-
Whenever I try to make a NEW post or EDIT a post,
I need to use Custom Fields as part of the post, as it’s an entertainment blog.However, when I scroll down to “Custom Fields” section,
– I click on the dropdown list as usual
– I can’t find my OWN custom field keys because the drop down list is filled with these entries…nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784
nxs_snap_sh_FB085749
nxs_snap_sh_TW088576
nxs_snap_sh_TR0_7784Let’s just say, the entire drop down list is filled with those.
It doesn’t matter if the post is a draft, published or currently being edited. They are always there.
Whether the fields are the same or new fields, I don’t know. I didn’t really check, because there’s so many.
So, I’ve spent days trawling google to find a piece of code to hide certain words from “custom field drop down”
This is the best code i found…
/* hide custom field “suggestions” from dropdown list */ add_filter( 'postmeta_form_limit', 'wpse_73543_hide_meta_start' ); function wpse_73543_hide_meta_start( $num ) { add_filter( 'query', 'wpse_73543_hide_meta_filter' );return $num;} function wpse_73543_hide_meta_filter( $query ){ // Protect further queries. remove_filter( current_filter(), __FUNCTION__ ); $forbidden = array ( 'enclosure', 'sharing_disabled', 'voted_IP', 'nxs_snap_sh_TW088576 ', 'nxs_snap_sh_TR0_7784', 'nxs_snap_sh_TW088576 ' ,'snap_MYURL','snapTW','snapFB','snapTR','snapEdIT','bwps_enable_ssl'); $where = "WHERE meta_key NOT IN('" . join( "', '", $forbidden ) . "') "; $find = "GROUP BY"; $query = str_replace( $find, "$where\n$find", $query ); return $query; }
It DOES NOT WORK. The values are still there, and its driving me nuts. What causes this ?
//
Basically, I only want to hide any dropdown values that contain this “nxs_snap_sh_” , that’s allhttps://www.ads-software.com/plugins/social-networks-auto-poster-facebook-twitter-g/
- The topic ‘So many strange entries in Custom Fields drop down & it affects me posting …’ is closed to new replies.