Hello everyone,
I am building a Dynamic Events Calendar using JetEngine Listing Calendar and Bricks Builder
Plugins:
Advance Custom FIelds v6.4.1
Jet Engine v3.7.6
Bricks v2.0.2
The Setup:
- CPT: Eventos.
- Taxonomy: Tipo de Evento (slug:
tipo-de-evento, assigned to Events). - Taxonomy Meta Field: A Color Picker field named
color_de_la_etiqueta(added to the taxonomy term using JetEngine). - Listing: Created with Source: Post for the Eventos CPT
*The Problem:
I cannot retrieve the value of the taxonomy meta field (color_de_la_etiqueta) inside the Listing Item for my Events CPT to use it as a dynamic background or border color in the calendar cell. The Listing is in a Post context, and I cannot properly “cross-reference” to the associated Taxonomy Term Meta.
What I have tried (and failed):
- Choosing the Taxonomy Term Meta data option as a Dynamic tag, on the container’s background color setting. (I’ve tried with both values {color_de_la_etiqueta} and {acf_color_de_la_etiqueta} it does not output the color value)
- I tried adding a custom PHP function to my child theme’s
functions.phpfile to retrieve the color and then calling it using a dynamic tag on the container’s background color field:{echo:get_color()}.
The PHP function I used was:
PHPfunction get_color() { $categories = get_the_category(); if ( ! empty( $categories ) ) { $mycat = "tipo-de-evento_" . $categories[0]->term_id; $color_picker_value = get_field('color_de_la_etiqueta' , $mycat ); return $color_picker_value; } }
This PHP method did not work either. I’ve seen some posts with this same error and tried their solutions but didn’t work for me. Maybe I’m doing something wrong. If you need more information, I’ll be glad to share.
