Home › Forums › ACF PRO › Question set Global variable ACF › Reply To: Question set Global variable ACF
Thank you @hube2, last question.Since I often use combinations combined with fields acf which often are repeated in various parts of the template (such as the name of the couple, and if this alternative is shown as an example), what do you think the use of functions like this?
function my_function(){
$biography_groom = get_field('field','option');
if(!empty($biography_groom)){
echo $biography_groom;
} else {
_e('Here to tell a brief description of the bride. You can put whatever you like, even your intentions towards the groom.','italian-wedding-day');
}
}
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.