Custom post type with new taxonomy [duplicate]

$labels = array( ‘name’ => _x( ‘Categories’, ‘taxonomy general name’ ), ‘singular_name’ => _x( ‘Category’, ‘taxonomy singular name’ ), ‘search_items’ => __( ‘Search Types’,’SkyDance’ ), ‘all_items’ => __( ‘All Category’,’SkyDance’ ), ‘parent_item’ => __( ‘Parent Category’,’SkyDance’ ), ‘parent_item_colon’ => __( ‘Parent Category:’,’SkyDance’ ), ‘edit_item’ => __( ‘Edit Categories’,’SkyDance’ ), ‘update_item’ => __( ‘Update Category’,’SkyDance’ ), … Read more

Problem retrieving custom field for a custom post type

The solution is simple: in the first loop, you are setting the $amazon_link like this: $amazon_link = get_field(‘amazon_link’, $image[‘ID’]); but in the second loop, you are setting a $link, like this: $link = get_field(‘amazon_link’, $image[‘ID’]); but you’re still trying to echo $amazon_link variable later on, which has never been setup in the second loop, so … Read more