Created
May 1, 2024 01:48
-
-
Save zackeryfretty/14fd2108f53c28424dc25c8073fc4e2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ACF: Options Page Field Getter | |
function zf_acf_options_field_shortcode( $atts ){ | |
$atts = shortcode_atts( | |
array( | |
'field' => '', | |
), | |
$atts, | |
'zf-acf-options-field' | |
); | |
$field_value = get_field( $atts['field'], 'option' ); | |
return $field_value; | |
} | |
add_shortcode('zf-acf-options-field','zf_acf_options_field_shortcode'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment