Support

Account

Home Forums ACF PRO ACF Form – form taxonomy check by default Reply To: ACF Form – form taxonomy check by default

  • Yes ! It wad the problem since the begining. At final I change the code in

    add_action( 'get_header', 'tsm_do_logged_in_author_checks' );
    function tsm_do_logged_in_author_checks() {
    
    	// Bail if not logged in or able to post
    	if ( ! ( is_user_logged_in()|| current_user_can('publish_posts') ) ) {
    		echo do_shortcode( '[wppb-login] ' );
    		return;
    	}
    
    	// Add required acf_form_head() function to head of page
    	add_action( 'get_header', 'tsm_do_acf_form_head', 1 );
    	
    	//Deregister the admin styles outputted when using acf_form
    	add_action( 'wp_print_styles', 'tsm_deregister_admin_styles', 999 );
    	
    	// Add the acf_form
    	add_action( 'genesis_entry_content', 'tsm_do_create_post_form' );
    	
    	// Catégorie
    	add_filter( 'acf/load_value/key=field_54dfccb977a11', 'vivi_load_post_category');
    }

    and this

    // Load défault categorie
    function vivi_load_post_category($field) {
    
    	// get Impro & Paris
    	$term_ids = array(28,72);
    
    	// return
    	return $term_ids;
    }

    It’s working perfectly.
    Thanks a lot John.