Skip to content

Instantly share code, notes, and snippets.

@manoj-singh-developer
Last active March 13, 2019 12:34
Show Gist options
  • Select an option

  • Save manoj-singh-developer/d19726fc377fc6e5048ab29a75e3983f to your computer and use it in GitHub Desktop.

Select an option

Save manoj-singh-developer/d19726fc377fc6e5048ab29a75e3983f to your computer and use it in GitHub Desktop.
<?php /* Template Name: Hotel Custom */ ?>
<?php
$args = array(
'post_type' => 'hotel_listing', //remember this is-case sensitive
'posts_per_page' => -1,
);
$releaseQuery = new WP_Query( $args );
if ( $releaseQuery->have_posts() ) :
while ( $releaseQuery->have_posts() ) :
$releaseQuery->the_post();
$c_id = get_the_ID();
echo get_the_title();
echo get_post_meta($c_id, 'price', true);
endwhile;
endif;
wp_reset_query();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment