For my portfolio page, I want for certain items to display a video instead of just a still image for it's featured image. I have using a plugin to play the video on hover called upon by a shortcode. This I insert on each post with the help of AFC.
The custom field is called video_link and below I have tried to replace the featured image with the video by calling it via AFC if it's filled, I cannot get this to work.
<li id="post-<?php the_ID(); ?>" <?php post_class( $additional_classes ); ?>>
<?php if( get_field( 'video_link' ) ) {
get_field( 'video_link' );
} else {
if( has_post_thumbnail( get_the_ID() {
<?php get_the_image( array( 'size' => 'portfolio-thumb', 'width' => 600, 'height' => 400, 'before' => '<div class="post-thumb">', 'after' => '</div>' ) ); ?>
}
}
<h3><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wp' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
Any idea what is wrong. Any help is much appreciated.
Below is the website I'm trying to get this to work on:nordenson.nu