Hi John,
Thanks for your reply. Actually, yes, “A” and “B” are taxonomies for the “Member” Custom Post Type. I going to search into the forum for “conditional logic on taxonomy field”.
It works lke a charm !
And donβt forget reset your query to avoid errors in future queries.
Indeed !
Thank you so much for your time celestial.
Hi celestial,
Thanks for your help !
I’ve tried your proposition and the text into the button is correctly displayed but the url return https://domain-name.com/vibes/Array
for every button I’ve created.
I’m using these buttons into a custom query :
<?php
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
?>
<?php
while ( $the_query->have_posts() ) : $the_query->the_post();
$url = parse_url( get_field( 'vibe_url', get_the_ID()) );
$btn_url = $url['host'] . $url['path'];
?>
<a class="wp-block-button__link" href="<?php echo $url; ?>"><?php echo $btn_url; ?></a>
<?php endwhile; ?>
<?php endif;?>
so I’ve guessed it could be a scoping issue but adding get_the_ID()
in second parameter doesn’t help π
What do you think?
Thanks again,
J
Haha that’s a brilliant idea! Thank you John
Ok, I found my mistake. If it could be useful to someone, don not forget to add , get_the_ID()
to make it work.
like so in my exemple
<h5><?php the_field('realisation_sub'); ?>h</h5>
π