• Resolved frengo70

    (@frengo70)


    Hello
    is it possible to exclude the import of wp-bakery shortcodes from other builders in order to import only the real content?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @frengo70,

    is it possible to exclude the import of wp-bakery shortcodes from other builders in order to import only the real content?

    You can use a custom PHP function to strip the shortcodes from the content import element: https://www.wpallimport.com/documentation/developers/custom-code/inline-php/. Here is an example snippet that you can modify as needed:

    // Remove shortcodes from data/content/string
    function my_remove_shortcodes( $data ) {
    	$pattern = '#\[[^\]]+\]#';
    	preg_match_all( $pattern, $data, $matches );
    	foreach ( $matches as $key => $match ) {
    		$data = str_replace( $match, '', $data );
    	}
    	return $data;
    }
    Plugin Author WP All Import

    (@wpallimport)

    Hi @frengo70,

    I am going to mark this thread as resolved since it’s been inactive for a while. You can open up a new topic if you still have any questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘builder shortcode’ is closed to new replies.