Display Custom Post Type In A List On A Page ???
-
Hi All,
1. Per the instructions on this page … https://wp-types.com/documentation/user-guides/displaying-wordpress-custom-content/ …
2. Created file named … customposttype.php
3. Per instructions on this page, placed file in root of WP install where you also find wp-config.php or wp-load.php … according to the section just above the section titled “Simple Query To Load Custom Content”.
4. With customposttype.php file placed in the WP install root, nothing happens.
5. This is the code in the file:
<?php
//Define your custom post type name in the arguments
$args = array(‘post_type’ => ‘rv-info-site’);
//Define the loop based on arguments
$loop = new WP_Query( $args );
//Display the contents
while ( $loop->have_posts() ) : $loop->the_post();
?>
<h1 class=”entry-title”><?php the_title(); ?></h1>
<div class=”entry-content”>
<?php the_content(); ?>
</div>
<?php endwhile;?>7. On line 5, the custom post_type has been entered, you see it above, rv-info-site.
8. If there are additional steps, which I am thinking there must be, this page does not detail them.
9. Please point me in the right direction. I wish to display post entries belonging to custom post_type RV Info Site, with slug, rv-info-site on a page.
Thanks much,
B
- The topic ‘Display Custom Post Type In A List On A Page ???’ is closed to new replies.