Looping through posts
First of all, you need to have two separate loops – one for whatever it is that it’s displaying right now and second one for your custom post type. Right now the block where you want your custom posts to appear is located within the first loop, and that’s not good. I suggest that you read up on The Loop, and especially check some examples of multiple loops.
By the way, one can have nested loops, but that’s most likely not your case.
Templates
Also, from your comment not sure if that’s what you need, but for templating you can always take advantage of WordPress template hierarchy. That way you can have a separate template file for each of your custom post types, and then you fully control how each custom post appears.
For listing posts you need to look at the Custom Post Types display section.
Related Posts:
- Searching multiple custom post types and pages
- Setting a custom sub-path for blog without using pages?
- Add Content to Page without shortcodes
- Loading custom page template via plugin
- Get page by template?
- How to quickly switch custom post type singular template?
- Create second custom 404 page for selected post type
- is_page_template not working as expected
- Multiple portfolios with one custom post type?
- Help with CPT template pagination
- Custom Blog Post Listing in Genesis Sample Child Theme
- Pull in custom content types into page template
- Trying to edit the single page from a Custom Post
- Create Template for Custom Post Type same like for Page
- create a template page for a post
- Show Custom Post Type meta boxes only on Page Edit
- Filter widget outputs
- Why does my content disapear when I make a page to match an archive name?
- Custom post type pages return 404 page?
- How to get the current category with custom posts
- Custom permalink structure for remote content pages
- Setting a homepage – doesn’t seem to work
- Tag template not returning posts [closed]
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- A certain theme is forcing it’s singular post layout
- Add custom template ‘sub-page’ to Custom Post type?
- Displaying posts inside table having issues
- Question on templates
- Custom post type option page template
- How can I load Template file from wordpress plugin
- How can I find out what template is my custom post type using?
- Loading a template for a URL pattern
- Custom Homepage As Single Page or Custom Post Type?
- query_post while (have post) get_template_part()?
- Custom Post Type Template Based on Page Slug?
- using a template for more then 1 page
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- How to set a fall back template for a custom post type in a plugin?
- Post formats “audio” and “video” only showing in index.php
- How to add a post from a custom post type as the static page?
- How to list/show all custom post types regardless of category?
- How do I Make a custom post type get a custom post template in a plugin
- Dynamic page.php template for custom post types
- Custom Post Type with Nested Taxonomy and Template Files
- Pagination with custom loop
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Custom post type loops with different page templates
- Multiple templates for custom post type
- how to show all post in my page-grid.php template page
- How to make an archive page displaying posts in a date range
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Subpage template
- Multiple templates for a custom post type
- Troubles with making a custom template for posts
- Change archive page template using pre_get_post
- Query with no terms uses index.php template instead of archive.php
- WordPress Custom Post Type Children Template
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Getting template_include to work when allow_url_include is off?
- WordPress showing archive.php instead page
- Allow Static Page Load Dynamic Child Pages
- Page for custom post type
- Custom templates for a specific category
- Merge page with custom post type
- Creating separate feeds for custom post types
- How to get_term_meta on single custom post?
- How do I find a way to create a global single.php for a custom post type?
- How to use single.php for creating, reading and editing Custom Posts with ACF
- Dynamic assign a custom template to custom post type posts
- Assign a template to a custom post type when displayed by the main loop on the home page
- How to add page under a custom post type?
- How to create a archive template for custom post type [duplicate]
- Sets post_parent in custom post type posts automatically based on cpt->page name
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Conflict in function to allow single post template based on category
- How to make post templates to include shortcodes only?
- How To Display Posts Of Custom Post Type At Page Template
- How to use posts as tabs in a custom page?
- How to stop a permalink redirecting to a page whit same slug but different permalink
- Cannot save pages after migration
- Turning archive templates to a page template maintaining the slug
- get_permalink() of page the enclosing page not posts
- How to manage a custom post type archive as a page?
- How to Create a Default Fixed Custom Posts layout for text and images
- Why did permalinks setting affect the pages?
- How can I make my CPT read from page-*post-type*.php?
- Why isn’t my custom post type using the corresponding custom post template?
- Can not hook into custom post type template with: is_page() conditional?
- Page Template For Custom Post Type doesn’t work on URL containing CPT name, other URL’s work
- Query custom post type and showing its content
- Search page for custom post type
- Programmatically Split A Post Into Multiple Pages
- Display Custom Taxonomy of custom post type
- Custom page template not recognized with permalinks on
- Custom Post Type Template based on Taxonomy
- Page template anomaly
- How to make a template for a specific post of a custom post type?
- WP_Query is getting the post but the_post() not rendering any Post
- How do I hide single category post on my post page
- display related posts based on the PAGE TITLE