Filter default_content only for products
default_content is a filter used in the backend. You don’t necessarily have anything in the loop so standard functions will probably fail. However, you’re given a second argument of type WP_Post. You can check its post_type easily and work from there. add_filter(‘default_content’, ‘WPSE_product_default_content’, 10, 2); function WPSE_product_default_content($post_content, $post) { if ($post->post_type !== ‘product’) return $post_content; … Read more