# spicebox/0.6/inc/spicepress/default-pages/contact-page.php

SpiceBox, version 0.6. 19 lines.

- Page: https://pluginprobe.com/plugins/spicebox/0.6/code/inc/spicepress/default-pages/contact-page.php
- Raw: https://pluginprobe.com/plugins/spicebox/0.6/raw/inc/spicepress/default-pages/contact-page.php
- Modified: 2019-04-22T07:29:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/spicebox/0.6/code/inc/spicepress/default-pages/contact-page.php#L10-L20`.

```php
<?php
        // Create a Contact us page 
         $post = array(
              'comment_status' => 'closed',
              'ping_status' =>  'closed' ,
              'post_author' => 1,
              'post_date' => date('Y-m-d H:i:s'),
              'post_name' => 'Contact',
              'post_status' => 'publish' ,
              'post_title' => 'Contact',
              'post_type' => 'page',
              'post_content' => '[contact-form-7 id="6" title="Contact form 1"]'
        );  
        //insert page and save the id
        $newvalue = wp_insert_post( $post, false );
        if ( $newvalue && ! is_wp_error( $newvalue ) ){
            update_post_meta( $newvalue, '_wp_page_template', 'template/template-contact.php' );
        }
?>
```
