Custom Post Types
-
Hi,
I have created a Custom Post Types manually. All works well, but I can add the new Post Type to be displayed properly. I have used this in my functions.php:
add_action( ‘pre_get_posts’, ‘add_my_post_types_to_query’ );
function add_my_post_types_to_query( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( ‘post_type’, array( ‘post’, ‘recipes’ ) );
return $query;
}What is does is, it shows on the home page, but only as a featured post and not displaying along with the other posts (the default posts).
Here is an image of the issue: https://ibb.co/ik45f5
As you can see, the 3 new posts are featured images and below the regular posts.
How can I add the new content type to act like regular posts? It seems that the new content type is not integrating with anything (widgets) as well.
Please help, I have been trying to fix this for a week now.
Thank you!
- The topic ‘Custom Post Types’ is closed to new replies.