Change particular text or url in page content on wordpress using MYSQL?

1)I have 85 pages in my website, in that i like to change particular url which have used in all pages.

2)I need update query for select particular posts and change repeated things in that content

Read More

need to replace below url anbomanufacturing.com/LitForm.html;

with this url192.185.104.157/~anbomanu/product-literature

Related posts

Leave a Reply

2 comments

  1. try with this, and place this code in your functions.php file to replace the link from the content:

    add_filter('the_content', 'link_replacer');
    
    function link_replacer ($content = '') {
        $pattern = "/anbomanufacturing.com/LitForm.html/";
        $replace = "192.185.104.157/~anbomanu/product-literature";
    
        return preg_replace( $pattern, $replace, $content );
    } 
    

    for more information take a look on the the_content Filter