Created
June 19, 2020 12:40
-
-
Save rahuladams/e582b0097ecf60e6dec720dfd75d5d11 to your computer and use it in GitHub Desktop.
How to display Custom Post Type UI content in the theme.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'cptui_post_slug', | |
'posts_per_page' => 10, | |
'orderby' => 'meta_value_num', | |
'order' => 'ASC', | |
'paged' => $paged, | |
); | |
$post_name = new WP_Query( $args ); | |
?> | |
<?php if ( $post_name->have_posts() ) : ?> | |
<?php while ( $post_name->have_posts() ) : $post_name->the_post(); ?> | |
// Call title, content, ACF fields here.. | |
<?php endwhile; endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment