I’d guess that the get_sidebar()
inside the loop is causing the problem. It should be outside the loop.
The way it is now, one post is displayed, then you call the get_sidebar()
code, which displays the sidebar stuff, then the loop continues with the next post.
Move the get_sidebar()
outside the loop.
Related Posts:
- Custom page sidebar using Template dropdown box
- Custom Post Type Data in Sidebar widgets?
- Setting a custom sub-path for blog without using pages?
- Add Content to Page without shortcodes
- Post formats “audio” and “video” only showing in index.php
- Creating a Custom Post Type for Inserting Preset Content into Post & Pages?
- Add a Template to a custom post type
- WordPress calls archive page instead of Custom Page Template
- How do I Make a custom post type get a custom post template in a plugin
- Assign Page Template Within A Custom Post Type
- Dynamic page.php template for custom post types
- Page Templates – this code only works for one Custom Post Type
- Pagination on a custom page template
- Custom Post Type – Archive page title
- Multiple templates for custom post type
- How do I create a custom post type for a training CMS in WordPress?
- How do I create a page template to display a custom post type?
- How to make an archive page displaying posts in a date range
- Custom Post Type slug same as page name causing a conflict
- Child page in custom post throws 404 page not found
- CPT: archive-cpt.php VS custom page template
- Take Variables Set in Functions.php and Echo Them Inside My Custom Post Template
- Including Custom Post Type posts in a page template contextually (or should I widget?)
- Help with CPT template pagination
- Custom Blog Post Listing in Genesis Sample Child Theme
- After updating a page, all pages on the site used the index.php template
- Page Templates Drop Down Select for Custom Post Types
- Pull in custom content types into page template
- Editable content on a Custom Archive page
- Using custom page templates with plugin [duplicate]
- Troubles with making a custom template for posts
- Creating a Page to View the List of Posts for a Custom Post Type?
- Change archive page template using pre_get_post
- create a template page for a post
- Custom post type archive page template
- Random image from tag/custom type on sidebar
- Custom Post Type Query for Sidebar Doesn’t Work on Front Page
- redirect automatic page that serves custom posttype content
- WordPress showing archive.php instead page
- Show Custom Post Type meta boxes only on Page Edit
- Adding the_content() in custom template email
- Creating a Page Template to display all items from a Custom Post Type
- Filter widget outputs
- Why does my content disapear when I make a page to match an archive name?
- Custom Post Type Template Alternative
- General advice on addressing content-centric pages
- Fields for different parts of a page
- How do you create a custom template to display a category with an image and related posts below?
- Pages Become “Archive” Instead of Using Page Template
- How can I set the page template of a new custom post type post?
- Custom URL redirect in WP
- WordPress Picks Up Wrong Template for Custom Post Type Archive Page
- Associate page w/ specific single post template?
- get comments by current user inside page template
- Custom page for editing custom post type on frontend based on url
- Dynamic assign a custom template to custom post type posts
- How to get the current category with custom posts
- How do I display child post types in the parent post type template
- How to add page under a custom post type?
- Custom permalink structure for remote content pages
- Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis
- Custom Post Type Specific Post Template
- Adding link to dashboard sidebar, nested under custom post type
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Display custom post type from template
- How to use pre_get_posts on archive page custom post type
- Can I automatically assign a page template to a custom post type (i.e page-slug.php file)
- How To Display Posts Of Custom Post Type At Page Template
- Custom Post type dont use custom page template (slug is not right)
- How to change Elementor Template for Single Page Post on Load
- A certain theme is forcing it’s singular post layout
- How do I find out which (page) template file my custom child post is looking for?
- WordPress Page hierarchy ( parent is singular of custom post types slug ) is returning not found
- Custom post type not pulling CSS
- How can I use one instance of page.php to display different custom post types?
- Custom post type option page template
- Custom post Query and WordPress Post Query Clash
- How to display a custom post as a page (but unedited)?
- How can I find out what template is my custom post type using?
- Search custom post type result in same template page
- Custom post type , page template not grabbing the page template
- How do I get the posts from single page custom post type from a sidebar to display in a page?
- Can not hook into custom post type template with: is_page() conditional?
- custom fields not showing before get_header
- Page Template For Custom Post Type doesn’t work on URL containing CPT name, other URL’s work
- custom post type archive slug vs. custom page template
- Custom Post Type Pagination Not Working or Single Posts Displaying?
- How to create a custom template for this custom post type?
- Nested custom post types templating
- Query custom post type and showing its content
- How to divide posts (custom post type) content on multiple pages?
- Modifying and Displaying URL’s in a Post Template using parse_url
- Display Custom Taxonomy of custom post type
- Custom page template not recognized with permalinks on
- Targeting specific Page Template for sidebar page
- Page template anomaly
- Adding custom theme template to custom post type [duplicate]
- Can you programme the selected page template to display block patterns automatically?
- I want to show a list of posts under specified categories
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs