This post includes several PHP snippets you can use to include different posts types on your home page loop.
Here’s the question this post provides the answer to:
I am wanting to add a CPT to the homepage along with Posts
Copy one of these snippets from the view raw link in the Gist and paste it at the end of your child themes functions file using a code editor.
All Post Types
This code will include all post types like posts, pages and custom post types.
Posts & Custom Post Types
This code will include your regular posts and the post type you add to the array in the code. Simply replace your-cpt with the name of your custom post type and add multiple CPT’s separated by a comma if needed.
Posts & Pages
This code includes both posts and pages in your home page loop
Leave a Reply