Skip to content

Instantly share code, notes, and snippets.

@FearTheWild
Created July 9, 2020 17:26
Show Gist options
  • Save FearTheWild/ee52f4739843e30a52a7325b8450517a to your computer and use it in GitHub Desktop.
Save FearTheWild/ee52f4739843e30a52a7325b8450517a to your computer and use it in GitHub Desktop.
<?php
/**
* Block Name: Track Record
*
*/
?>
<div id="trackrecord" class="trackrecord" data-scroll>
<div class="container">
<div id="properties-filter">
<!-- FILTERS HERE -->
</div>
<?php
$args = array(
'post_type' => 'properties',
'posts_per_page' => '3',
'paged' => 1,
);
$the_query = new WP_Query( $args );
if( $the_query->have_posts() ): ?>
<div id="properties-grid">
<?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php $post = get_post(); ?>
<h2><?php the_title(); ?></h2>
<?php endwhile; ?>
</div>
<a id="properties-loadmore">View more</a>
<?php
endif;
wp_reset_query();
?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment