Ignition comes with an ACF field that adds a second featured image field. It appears on every post type and is very useful. It allows you to show a different image for the single view so you can have one image for the card view, and one for the single view.
Ignition comes with a function for showing the header image. The following function will get the
echo ign_get_header_image($post_id);
This will output the
You can also get the image as an html image by adding the second parameter. In fact here is the full function.
function ign_get_header_image($post_id, $return_type = 'url', $attr = ''){
if( get_field('no_image', $id) ){
return '';
}
$image = get_field('header_image');
if($kind == 'url'){
return ign_get_the_image_url($id, 'header_image', $image);
}
else{
return ign_get_the_image($id, 'header_image', $image, $attr);
}
}
As you can see, you can pass anything other than ‘
This function is just getting the other two media functions that come with Ignition. One get’s the