Use this to create the html for the slider: function jma_nivo($input = array() ){ $defaults = array( ‘class’ => ”, ‘acf_field’ => ‘gallery’, ‘image_size’ => ‘tb_grid’, ‘thumb_size’ => ‘tb_thumb’, ‘post_id’ => ”, ‘image_ids’ => ”, ); foreach($defaults as $var => $default){ $args[$var] = isset($input[$var]) && $input[$var]? $input[$var]: $default; } extract($args); if(!$post_id){ global $post; $post_id = […]
ACF on Taxonomy Page
use get_queried_object to grab the value of the taxonomy (here in the location taxonomy). function country_content_addition() { $queried_object = get_queried_object(); $country_input = get_field(‘camp’, $queried_object); $camp_input = get_field(‘camp_description’, $queried_object); do whatever ….. } function add_tab_content(){ if(is_tax(‘location’)) add_action(‘themeblvd_content_top’, ‘country_content_addition’); } add_action(‘template_redirect’, ‘add_tab_content’);
Add Repeating Custom Field to Custom Post Type with Content Filter
function park_content_filter( $content ) { $new_content = ‘<div class=”camp-wrap clearfix”>’; $new_content .= ‘<div class=”item-title”>Camp</div>’; $new_content .= ‘<div class=”item-value”>Description</div>’; if(function_exists(‘get_field’) && get_field(‘camp’)){// camp is the field group while(has_sub_field(‘camp’)){ $new_content .= ‘<div class=”item-title”>’ . get_sub_field(‘camp_name’) . ‘</div>’; $new_content .= ‘<div class=”item-value”>’ . get_sub_field(‘camp_description’) . ‘</div>’; } } $new_content .= ‘</div><!–camp-wrap–>’; $content = $content . $new_content; return $content; […]