I have a very similar question to this: Custom Fields Bulk Edit
I would like to edit ALL of the data inside a custom field but instead of replacing values I would like to instead add an attribute to the custom field on each page. Example:
This is an existing shortcode
[idx-listings linkid="387056" count="6"]
I now want to add an attribute to look like this:
[idx-listings linkid="387056" count="6" showlargerphotos="true"]
Is there a way of bulk apending the showlargerphotos
attribute inside the existing shortcode without affecting the rest of the string?
Here is the custom field in the wp_postmeta
table
I have a very similar question to this: Custom Fields Bulk Edit
I would like to edit ALL of the data inside a custom field but instead of replacing values I would like to instead add an attribute to the custom field on each page. Example:
This is an existing shortcode
[idx-listings linkid="387056" count="6"]
I now want to add an attribute to look like this:
[idx-listings linkid="387056" count="6" showlargerphotos="true"]
Is there a way of bulk apending the showlargerphotos
attribute inside the existing shortcode without affecting the rest of the string?
Here is the custom field in the wp_postmeta
table
1 Answer
Reset to default 1In phpMyAdmin:
update wp_postmeta set meta_value =
replace(meta_value,'[idx-listings','[idx-listings showlargerphotos="true"');
As long as you've always typed the shortcode starting with [idx-listings
and not, say, [ idx-listings
, this will add your new attribute everywhere the shortcode has been used.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744935030a4601968.html
评论列表(0条)