Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Artist Signup-test
- */
- // =============================================================================
- // VIEWS/INTEGRITY/WP-SINGLE.PHP
- // -----------------------------------------------------------------------------
- // Single artist post output for Integrity.
- // =============================================================================
- $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );
- ?>
- <?php
- if ( is_user_logged_in() || current_user_can('publish_posts') ) { // Execute code if user is logged in
- acf_form_head();
- wp_deregister_style( 'wp-admin' );
- }
- get_header();
- ?>
- <div id="content" style="width: 70%; margin:0 auto;">
- <?php
- if ( ! ( is_user_logged_in() || current_user_can('publish_posts') ) ) {
- echo '<p>You must be a registered author to post.</p>';
- } else {
- acf_form(array(
- 'post_id' => 'new_post',
- 'field_groups' => array(478,5977), // Used ID of the field groups here.
- 'post_title' => true, // This will show the title filed
- 'post_content' => true, // This will show the content field
- 'form' => true,
- 'new_post' => array(
- 'post_type' => 'artist',
- 'post_status' => 'publish' // You may use other post statuses like draft, private etc.
- ),
- 'return' => '%post_url%',
- 'submit_value' => 'Submit Artist Profile',
- ));
- }
- ?>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement