Created
November 5, 2012 18:06
-
-
Save clarklab/4019349 to your computer and use it in GitHub Desktop.
set a page template programmatically in WordPress
This file contains hidden or 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
update_post_meta( $post_id, '_wp_page_template', 'page-contact.php' ); |
can you please tell me how to do this using hook ?
Nice 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So this one is pretty dang simple, I'm just sharing it because I used to not know that a page template could be set so easily.