Created
February 5, 2018 15:52
-
-
Save jbd91/ab184498e875013cb36343beb0213b1f to your computer and use it in GitHub Desktop.
ACF Get Tax Term Page Field Data
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
| // GET TAXONOMY TERM DATA (NATIVE AND ACF) | |
| $queried_object = get_queried_object(); | |
| $taxonomy = $queried_object->taxonomy; | |
| $term_id = $queried_object->term_id; | |
| $term_slug = $queried_object->slug; | |
| $content = get_field('content', $taxonomy . '_' . $term_id); | |
| $featured_image = get_field('featured_image', $taxonomy . '_' . $term_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment