Replace the above mytheme_render_infinite_scroll
function with this:
function mytheme_render_infinite_scroll() {
while ( have_posts() ) : the_post();
if ('mytheme_portfolio' == get_post_type()) :
get_template_part( 'content', 'archive-portfolio' );
else :
get_template_part( 'content', get_post_format() );
endif;
endwhile;
}
Related Posts:
- Exclude Post Type from Jetpack Infinite Scroll
- Jetpack Infinite Scroll won’t fire [closed]
- Get Post ID by Content
- Remove tinyMCE from admin and replace with textarea
- How do I create new content pages for my Custom Post Type?
- Custom post metadata not appearing in public API
- What is the impact if i ignore title and content in my custom post types CPT?
- WordPress theme options vs custom post types
- Best way to save horoscope data
- How can you use one database with multisite
- Redirect to another page using contact form 7? [closed]
- Remove “show sharing buttons” metabox Jetpack from custom post type
- get parent content inside child posts
- Adding Template Post Content
- How should I structure complex content hierarchies?
- WordPress general content best pratices
- php dynamic content inside shortcode
- How might I change the destination of a link?
- Register CPT if Jetpack Portfolio is not active and only once
- Infinite scroll doesnt work
- How to use TOC with ACF?
- Expandable WordPress content (text) inside a post
- Change “Enter Title Here” help text on a custom post type
- Multiple custom post types under one admin menu
- CPT Template Not Showing – Getting 404
- Random post, once per day
- Prevent Google from indexing custom post types?
- Count post that have specific meta value
- Remove date and category filters when editing custom post types
- Display all custom post types in archives.php
- How to select one major category (or custom taxonomy) for a custom post type?
- Custom taxonomy & post slug permalink
- sort events based on event date custom field
- How to add page attribute “Template” to custom post
- Child and grandchild taxonomy listings – 404
- Can’t edit Custom Post Type slug/permalink
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Select menu should display categories and the item’s depth
- Rewrite numeric ID parameter for hierarchical custom post type
- Delete all associated media when custom post type removed
- Custom Post Type Definition should not be in the theme – how?
- Include CPT values in another CPT?
- Exclude the_content (); from page password protection
- query_posts with a custom post type, a meta_query and sorting by post date?
- sort order for a custom post-type [closed]
- How to get “custom post type”-archive with working permalink to it?
- React post to WordPress custom post type
- Remove single page for custom post type
- Custom fields vs. Custom post types for a Portfolio Website
- How to check post type (to include custom css)
- wp_insert_term in a multisite installation
- Custom loop with multiple taxonomy queries
- AJAX load more for different custom post type loops
- Add custom ID to CPT posts only create not update
- Cannot save CPT meta box
- Tags not working in my custom post type
- wp_trash_post action hook with custom post type
- Return the name of the post type
- How to show my post type TEAM in dynamic way?
- Set parent for custom post type archive rewrite url
- How to rewrite the beginning and end of the permalink structure in a custom post type?
- Custom sidebar for custom post type
- ACF Relationship Posts how to show additional content
- Display next 3 posts based on custom taxonomy
- Change Post Meta via AJAX from the posts list table
- WordPress custom posts and permalinks
- How to create Custom image post?
- Weird issue where form field loses focus to previous form field even with JS disabled
- Display latest post of taxonomy
- posts_per_page in custom WP_Query does not override “Reading” settings?
- How To Read Read Custom Post Type Data in Headless CMS Mode
- Set Post Private if no linked Post Objects (ACF)
- Show in an entry a Custom Post Type associated to a post
- WordPress shows after migration
- How to display custom field in product description?
- Show code dependant on CPT & category
- SEARCH QUERIES – REVERSE OUTPUT
- Media is not showing on post page
- How to get the posts that my following users are liked?
- How to insert post 6 times after user register like ask.fm
- Not Able to List CPT Based on Taxonomy Term
- Edit custom post type page with ACF repeater fields throws ‘Service Unavailable’ error
- Redirect sub-page URLs to parent without changing URL
- Filter Term By Parent Term – Custom Post Type
- Storing data in a multidimensional array from dynamically generated foreach loop
- How to decouple custom post types components from template?
- Custom post type cannot access child page
- Insert custom post type via XML-RPC?
- CPT or Custom Table for Repository of Serial Numbers
- erase post excerpt limitation [×]
- Using $seed on a custom post type for randomly displayed posts
- Get result from Custom Field in Custom Post type
- Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
- Problem with a query in custom posts
- Custom post-type’s pagination not working in category.php
- How to get lowest price from custom fields of posts
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Is there a function that replace category name with a icon?
- Custom Post Type urls not working
- Just the First Metabox what saves the data!