SHARE
TWEET

WP CPT display custom query

wardhanarizaldi Jan 19th, 2020 (edited) 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    <!-- Display custom query CPT -->
  2.  
  3.             <h2>Menu Unggulan</h2>
  4.             <?php
  5.             $homepageMenus = new WP_Query(array(
  6.                 'post_type' => 'menu',
  7.                 'tax_query' => array(
  8.                     array (
  9.                         'taxonomy' => 'sajian',
  10.                         'field' => 'slug',
  11.                         'terms' => 'unggulan',
  12.                     )
  13.                 ),
  14.             ));
  15.              while($homepageMenus->have_posts()) {
  16.                  $homepageMenus->the_post(); ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top