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
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.