There is no “default” post format type, though internally in core, a post that has no post format assigned is usually referred to as standard. So, your first conditional will return false
using post-format-normal
because there is no such post format – but would still return false using post-format-standard
.
You could reverse the conditional, and check for gallery post format first. Note that you could use either 'gallery' == get_post_format()
or has_post_format( 'post-format-gallery' )
. (Personally, I find get_post_format()
to be a bit more intuitive.)
In any case, you would reverse the conditional like so:
if ( has_post_format( 'post-format-gallery' ) ) {
flexslider('index-post-image');
} else {
// Fallback output here
}
Note that you also have syntax errors in your code, such as nested PHP tags.