plugins - Bulk edit existing shortcode within custom field

I have a very similar question to this: Custom Fields Bulk EditI would like to edit ALL of the data inside a custom fiel

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

Share Improve this question edited Dec 5, 2019 at 21:37 Chris asked Dec 5, 2019 at 20:57 ChrisChris 1174 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

In 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

相关推荐

  • plugins - Bulk edit existing shortcode within custom field

    I have a very similar question to this: Custom Fields Bulk EditI would like to edit ALL of the data inside a custom fiel

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信