Skip to content

Instantly share code, notes, and snippets.

@besimhu
Created July 24, 2015 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save besimhu/daa633592a6477836452 to your computer and use it in GitHub Desktop.
Save besimhu/daa633592a6477836452 to your computer and use it in GitHub Desktop.
Get ACF fields from taxonomy without using ACF functions.
<?php
// get taxonomy
$taxonomy = get_term_by( 'slug', get_query_var( 'taxonomy_name' ), 'my_custom_taxonomy' );
$acf_field = get_option( 'my_custom_taxonomy_' . $taxonomy->term_id . '_acf_field_slug' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment