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
- Assign same parrent Page to pages AND custom post types
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- redirect automatic page that serves custom posttype content
- Adding sidebar to template creates horizontal gap the size of the side bar
- WordPress showing archive.php instead page
- Allow Static Page Load Dynamic Child Pages
- How to render a custom post type template with custom fields using shortcode
- No Permission to add new Page, Post or CPT with Admin role
- Content vs Template on custom post
- How to use custom template files in deeper directory?
- WordPress Doesn’t Generate Taxonomy Archive
- A case for Hierarchical Custom Posts
- Static page determines as home, but it is not
- Custom taxonomy returns 404
- Adding the_content() in custom template email
- Creating a Page Template to display all items from a Custom Post Type
- Adding Page Templates to post but it ignored it
- How to use Custom Page Templates for hierarchical Custom Post Type
- Template for all categories of a custom post type?
- Custom Post Type Template Alternative
- Migrating a taxonomy’s tags to the native category
- General advice on addressing content-centric pages
- Flush Rewrite Rules when new site is created on network
- Top Level pages in wordpress giving 404, but child pages working fine
- Fields for different parts of a page
- next_/previous_post_link() `in_same_category` appears to fail when true
- Multiple templates for single custom post type
- Page for custom post type
- WordPress custom taxonomy template not working
- How do you create a custom template to display a category with an image and related posts below?
- WordPress Custom Search by post_type
- How can I get this request to use the Custom Post Type page template instead?
- How to specify a template for a path like http://example.com/something?
- Custom templates for a specific category
- Archive for a Taxonomy of a Custom Post type
- Why does not this wp_redirect work in is_single()?
- Pages Become “Archive” Instead of Using Page Template
- How can I set the page template of a new custom post type post?
- Changing permalink name redirects to another template?
- Why is get_pages() returning a boolean?
- Pros and cons of a custom page vs custom post type template file
- WordPress 3.9 not using custom template
- How to include custom post type posts on a page?
- Multiple single templates?
- Template files for Custom Post Type and Taxonomy
- Set templates for custom post types
- How to Create Template File for Parent Page of Custom Post Type
- Need help with adding templates (archives and sitemap) to WordPress child theme
- Custom post_type search pages
- Including link to custom post type in ‘wp_list_pages’ function
- how to remove pages loading with the archive templates
- the_content(); of custom post type treated as an array or object
- Custom URL redirect in WP
- Main query not querying any posts in custom taxonomy template
- Custom Empty Results page for my Custom Post Type
- WordPress Picks Up Wrong Template for Custom Post Type Archive Page
- Associate page w/ specific single post template?
- Multiple pages per post (not pagination)
- Custom posts template page
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- Can I change my post type to anything and my site still work?
- How can I use archive-{post_type}.php theme template?
- Page listing Custom Posts
- Display an authors post on a single page only when they are logged in