Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Answer:
1. Copy everything from the "/wp-admin/admin.php?page=cptui_tools&action=get_code" page from the "All CPT UI Post Types" field.
2. Paste into the current theme's functions.php file
3. Paste the current code into the output page: where 'post_type' is the 'slug' you specified when creating the post type.
<?php $loop = new WP_Query( array( 'post_type' => '', 'posts_per_page' => 0 ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php endwhile; ?>
<?php wp_reset_query();?>
First, learn how to output something through shortcodes. Before touching page.php This is a template that should only be touched if you understand what you are doing well.
Make shortcode add_shortcode. Paste it into any page. First print something like Hello World. Then learn to display something like news.
It is not clear how the news is related to Custom Post Type UI. Usually, for news, a typical post section is used - a blog. Making news via CPT UI is very strange.
In general, there is a suspicion that you went somewhere in the wrong place. It is probably necessary to roll back a step - to describe the problem as a whole. Then choose more suitable solutions. And only then look for ways to implement.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question