Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'posts_per_page' => 1,
- 'meta_key' => 'meta-checkbox',
- 'meta_value' => 'yes'
- );
- $featured = new WP_Query($args);
- if ($featured->have_posts()): while($featured->have_posts()):
- $featured->the_post(); ?>
- <h3><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h3>
- <?php if (has_post_thumbnail()) : ?>
- <figure> <a href="<?php the_permalink(); ?>"><?php
- the_post_thumbnail(); ?></a> </figure>
- <p><?php the_excerpt();?></p>
- <?php
- endif;
- endwhile; else:
- endif;
- ?>
- <?PHP if( is_home() ) { ?>
- <div> … </div>
- <?PHP } ?>
- <?php if( is_home() ) {
- $args = array(
- 'posts_per_page' => 1,
- 'meta_key' => 'meta-checkbox',
- 'meta_value' => 'yes'
- );
- $featured = new WP_Query($args);
- if ($featured->have_posts()): while($featured->have_posts()):
- $featured->the_post(); ?>
- <h3><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h3>
- <?php if (has_post_thumbnail()) : ?>
- <figure> <a href="<?php the_permalink(); ?>"><?php
- the_post_thumbnail(); ?></a> </figure>
- <p><?php the_excerpt();?></p>
- <?php
- endif;
- endwhile; else:
- endif;
- endif;
- ?>
Add Comment
Please, Sign In to add comment