Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2.     $query = new WP_Query( array('post_type' => 'home_blocks', 'posts_per_page' => -1 ) );
  3.     while ( $query->have_posts() ) : $query->the_post(); ?>
  4.         <div class="item">
  5.             <h2><?php the_title(); ?></h2>
  6.  
  7.             <a href="<?php echo get_post_meta($post->ID, "_block_url", true); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail( 'full' ); ?></a>
  8.  
  9.         </div>
  10.     <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement