Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( is_page("Home") ) {
- if( have_rows('slider') ): ?>
- <div class="my-slider"><ul >
- <?php
- // loop through the rows of data
- while ( have_rows('slider') ) : the_row();
- // display a sub field value
- $image=get_sub_field('image');
- $title= get_sub_field('title');
- $byline= get_sub_field('byline');
- $link= get_sub_field('link');
- ?>
- <li>
- <div style="background-image: url(<?php echo $image; ?>); min-height: 600px; background-repeat: no-repeat; background-size: cover">
- <h2><?php echo $title; ?></h2>
- </h3><?php echo $byline; ?><h3>
- <a href="<?php echo $link ?>"></a>
- </li>
- <?php endwhile ?>
- </div>
- <?php
- else :
- // no rows found ?>
- <?php
- endif;
- } else {
- // This is not the blog posts index
- }
- ?>
- <div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement