fredericv
Forum Replies Created
-
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutYes, perfect ! I didn’t know shortcode_atts() function, it is the one to know 🙂
Thank you very much
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutYes, I am able to display perfectly an ACF field, like Data Picker. But I have to make some processes on it, not just display the field.
Have you an idea why I’m not able to access the post id through global $post or global $wp-query within a shortcode ?
Many thanks
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutI’m afraid that doesn’t work for me.
I added a shortcode field [processacfdate] in card within structural builder, then in functions.php :
function process_acf_date() {
$id = get_queried_object_id();
echo “post Id = ” . $id . “<br/>”;
}
-> displayed “post Id : 0” 🙁
The other global $post variable display nothing 🙁
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutThank you for your reply.
I have already tried this way, but I’m not able to get the ACF field from the global $wp_query within functions.php : the have_posts() functions return 0.
How do you get the current ymc query ?
Many thanks
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutThanks for your very quick answer 🙂
Your answer is almost perfect, the rendering is exactly what I’m needing ! But I need to do some extra processing on my ACF dates (I have in fact 2 dates, 1 for the beginning of an event, 1 for the ending, and I have to process it to properly display it) Do you think it’s possible ? How to do that ?
Many thanks !