This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( have_rows('repeater_field_name') ): ?> | |
<?php while ( have_rows('repeater_field_name') ) : the_row(); ?> | |
<?php the_sub_field('sub_field_name'); ?> | |
<?php endwhile; ?> | |
<?php else : ?> | |
<?php endif; ?> | |
/*Count fields*/ | |
<?php | |
$i = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( have_rows('flexible_content_field_name') ): ?> | |
<?php while ( have_rows('flexible_content_field_name') ) : the_row(); ?> | |
<?php if( get_row_layout() == 'paragraph' ): ?> | |
<?php the_sub_field('text'); ?> | |
<?php elseif( get_row_layout() == 'download' ): ?> | |
<?php endif; ?> | |
<?php endwhile; ?> | |
<?php else : ?> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $images = get_field('gallery'); ?> | |
<?php if( $images ): ?> | |
<ul> | |
<?php foreach( $images as $image ): ?> | |
<li> | |
<a href="<?php echo $image['url']; ?>"> | |
<img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" /> | |
</a> | |
<p><?php echo $image['caption']; ?></p> | |
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $posts = get_field('relationship_field_name'); ?> | |
<?php if( $posts ): ?> | |
<ul> | |
<?php foreach( $posts as $post): ?> | |
<?php setup_postdata($post); ?> | |
<li> | |
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> | |
<span>Custom field from $post: <?php the_field('author'); ?></span> | |
</li> | |
<?php endforeach; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( get_field('field_name') ) { ?> | |
<?php } else { ?> | |
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(get_field('logo')) { ?> | |
<?php echo get_field('logo', $post_id) ?> | |
<?php } ?> | |
<?php if(get_field('logo')) { ?> | |
<?php the_field('logo') ?> | |
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $image = get_field('thumbnail'); ?> | |
<?php if( !empty($image) ) { ?> | |
<div class="article_thumb"> | |
<?php | |
$url = $image['url']; | |
$title = $image['title']; | |
$size = 'news'; | |
$thumb = $image['sizes'][ $size ]; | |
?> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $thumb; ?>" alt="<?php the_title(); ?>"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $location = get_field('location'); ?> | |
<?php if( !empty($location) ): ?> | |
<div class="acf-map"> | |
<div class="marker" data-lat="<?php echo $location['lat']; ?>" data-lng="<?php echo $location['lng']; ?>"></div> | |
</div> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$params = array( 'width' => 1200, 'height' => 500 ); | |
$bfi_image = bfi_thumb(get_field('thumb'), $params); | |
?> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $bfi_image; ?>" alt="<?php the_title; ?>"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( have_posts() ) : ?> | |
<?php $main_news_first = new WP_Query('category_name=news&posts_per_page=1'); ?> | |
<?php while ($main_news_first->have_posts()) : $main_news_first->the_post(); ?> | |
<div class="main_news_first"> | |
<div class="main_news_first__box"> | |
<div class="main_news_first__box--image"> | |
<?php | |
$params = array( 'width' => 1200, 'height' => 500 ); | |
$bfi_image = bfi_thumb(get_field('thumb'), $params); | |
?> |
OlderNewer