update_post_meta with Template not Working
-
I am using the Genesis framework and am dynamically creating an Archive page when a new blog is created in a muliti-site install. I am trying to use update_post_meta to set the template of the page to the Genesis archive template. It works if I copy the template into the child theme folder but not if I reference the template in the framework folder.
This works with the template copied into the theme folder.
update_post_meta( $archive_page_id, '_wp_page_template', 'page_archive.php' )
This doesn’t work (referencing the framework folder)
update_post_meta( $archive_page_id, '_wp_page_template', get_theme_root() . '/genesis/page_archive.php' )
Any suggestions about what I may be doing wrong? Many Thanks!
- The topic ‘update_post_meta with Template not Working’ is closed to new replies.