Support

Account

Home Forums ACF PRO Change date format with jquery Reply To: Change date format with jquery

  • Been on to the developers and they wrote a shortcode for me

    function getdatefromacf_shortcode( $atts ) {
    
    	// Attributes
    	extract($atts = shortcode_atts(
    		array(
    			'postid' => '',
    			'metaid' => 'date_from'
    		),
    		$atts
    	));
    
    	return get_field($metaid, $postid);
    }
    add_shortcode( 'getdatefromacf', 'getdatefromacf_shortcode' );
    [getdatefromacf metaid='date_to' postid=%post_id%]
    
    [getdatefromacf metaid='date_from' postid=%post_id%]

    It solves the problem