Support

Account

Home Forums Front-end Issues group field in frontend page Reply To: group field in frontend page

  • 
    			<?php while ( have_posts() ) : the_post(); ?>
    
    	            <?php 
                	if (is_user_logged_in() && current_user_can('cliente')) {
                	// Get the current user
                		$current_user_id = get_current_user_id();
                		$args = array(
                		  'post_type' => 'clientes',
                		  'author' => $current_user_id
                		);
                		$posts = get_posts($args);
                		if ($posts) {
                		  $post_id = $posts[0]->ID;
                	       acf_form(array(
    		                	'post_id'  =>  $post_id,
    			                'submit_value' => __('Actualizar Mi perfil'),
    		                ));
                		}
                	}
                	?>
    			<?php endwhile; ?>