Created
October 16, 2021 17:32
-
-
Save webdevs-pro/0f6f22c7023a6e9aa4b949496c457a00 to your computer and use it in GitHub Desktop.
WP set default page template for new post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_insert_post', 'filter_function_name_11', 10, 3 ); | |
function filter_function_name_11( $post_id, $post, $update ) { | |
update_post_meta( $post_id, '_wp_page_template', 'elementor_canvas' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment