Custom HTML output in PHP template
-
Hi, this is great plugin! I have one question – how I get a custom HTML output (with ACF Custom fields) in PHP template? Like this template
<li class="movie"> <div class="movie__thumb"> <?php if (get_locale() == 'cs_CZ'):?> <?php $image = get_field('movie_poster', $recent['ID']); $size = 'poster'; if( $image ) { echo wp_get_attachment_image( $image, $size ); } ?> <?php else: ?> <?php $image = get_field('movie_poster_en', $recent['ID']); $size = 'poster'; if( $image ) { echo wp_get_attachment_image( $image, $size ); } ?> <?php endif; ?> </div> <div class="movie__content"> <h2><a href="<?php the_permalink($recent["ID"]); ?>"><?php echo $recent['post_title'] ?></a></h2> <?php $movie_year = get_field('movie_year', $recent['ID']); if( $movie_year ): ?> <a href="<?php echo get_home_url() . (get_locale() == 'cs_CZ' ? '/filmy?sfid=19&_sfm_movie_year=' : '/movies?sfid=19&_sfm_movie_year=' ) . $movie_year; ?>"><?php echo $movie_year; ?></a> <?php endif; ?> </div> </li>
The topic ‘Custom HTML output in PHP template’ is closed to new replies.