• stringrv

    (@stringrv)


    Hello there,

    I am using TDO Mini Forms to create pages from the front end. I can add php to “append to post” which will add code before the page is created. How can I set the template to something other than the default template. I have tried a combination of these codes and they are not doing it.

    <?php
     update_post_meta(684, "_wp_page_template", "squeezetemplate_001.php");
    ?>
    
    <?php
    apply_filters('Squeeze 01 (Header)', 'squeezetemplate_001.php');
    ?>

    Any thoughts on what I need to do here?

The topic ‘Setting a Template to a new page programmatically’ is closed to new replies.