0
votes

I am using custom post type plugin to create custom post types for my Wordpress website.

I want to add the custom post types to a page template. but, when I add the php loop to call the custom post type that I created, it calls the page content instead.

Does anyone know how to solve this problem? Thanks.

1
please post the code you triedphil
This is the code I've used: codepen.io/umarhmz/pen/doncvumarhamza

1 Answers

0
votes

Try this before the loop:

<?php query_posts(array('post_type' => 'your-cpt-name') ); ?>