Following up on this topic: Looper Support for Accessing GeoDirectory Custom Fields
Here’s a clearer rewording of your message:
I tried using [gd_post_meta key="instagram" show="value-raw" font_size="0"]
inside a text block, and it works as expected. However, when I try to use it in the Button Link URL field, it doesn’t work.
Is there a way to define all the variables in one place and reuse them across the Single Layout Template? For example:
{% set fburl = geodir_get_post_meta(post.id, "facebook", true) %}
{% set instaurl = geodir_get_post_meta(post.id, "instagram", true) %}
Since the shortcode doesn’t work inside the Button URL field, I’ve been using something like this instead:
{% set fburl = geodir_get_post_meta(post.id, "facebook", true) %}
{{ fburl }}
But if I want to conditionally display the button only when the Facebook link exists, I have to use a Twig condition like {% set fburl = geodir_get_post_meta(post.id, "facebook", true) %} {% if fburl %}
— which works, but becomes a bit annoying to manage, and I’m not entirely sure if it’s fully supported in all cases.