Remove divs and spans from post content
Im not sure what you are actually doing here but I think you are looking to create a block of code from the post content then strip unnecessary tags. I would use strip tags: https://www.w3schools.com/php/func_string_strip_tags.asp <?php require “wp-config.php”; // Post Types to include $args = array( ‘posts_per_page’ => ’50’, ‘post_type’ => array( ‘product’, ‘product-variation’ ) … Read more