How can I dynamically set the base URL of an ACF custom URL field?
Add the following code to dynamically set the base URL for your ACF custom URL field. Replace slide_url with the name of your ACF custom URL field function custom_acf_slide_url_base_url($value, $post_id, $field) { // Get the base URL dynamically based on the environment $base_url=””; if (strpos(site_url(), ‘staging’) !== false) { $base_url=”https://staging.example.com”; // Replace with your staging … Read more