dsrruefh12970 2015-08-11 17:57
浏览 57

如何自动将链接的某个部分更改为设置值

I always manually have to change the part of the link in the iframe src.

Here is an example of an iframe :

<IFRAME SRC="http://example.com/embed-aaaaa-620x360.html"</IFRAME>

What I want is 620x360.html to be 1000x450.html

So, is there a way that will change the code for all my post that I have created on wordpress without me doing it manually.

Also in the future i will embed more videos and i do not want to manually edit everytime I post a new post.

  • 写回答

1条回答 默认 最新

  • doukui7574 2015-08-11 18:02
    关注

    To do a "search and replacement" over all blogposts on Wordpress run this SQL query (In PhpMyAdmin as a suggestion). The query will search for 620x360.html and replace it with 1000x450.html.

    UPDATE wp_posts SET post_content = REPLACE (
    post_content,
    '620x360.html',
    '1000x450.html');
    

    If you are uncomfortable with making queries directly against the database, there are a number of plugins that help you with this. For example: https://wordpress.org/plugins/better-search-replace/

    评论

报告相同问题?