Use get_post_format() inside your loop:
if (have_posts()) :
while (have_posts()) :
the_post();
$format = get_post_format();
if (false === $format) {
get_template_part('content', get_post_format());
}
endwhile;
twentyfourteen_paging_nav();
else :
get_template_part('content', 'none');
endif;
Related Posts:
- How can I fetch loop of post titles via AJAX?
- get product attributes for current product and store it in a variable
- Displaying post per day
- Guidance with The Loop for CMS
- How to add active class to custom menu using while loop and wp_list_pages
- MySQL query performed 4 times inside loop
- Print html when custom field has value inside while loop
- Post from one loop in different containers?
- Custom Loop Pagination on WordPress
- delete an array element when its date expires
- Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin – Adding to “Thoughts” Theme
- User Defined order on get_categories?
- Custom Loop through category menu to include sub categories
- When would you use $_post instead of $post?
- How do I display the function the_content in this loop?
- Must Use Plugin Causing Query Error
- How to get to a specific position in wp_query?
- Advanced Custom Fields: Post Object – Not returning data [closed]
- Facebook “like” open graph meta in header.php
- Custom excerpt function re-factoring
- How can I show the post thumbnail from the most recent of a certain post type, in widget?
- How can I add multiple ‘tax_query’ arrays via a loop?
- ACF page while loop breaks footer while loop
- Using foreach loop breaks
- Split loop into two columns, how to favor one side over the other
- Dynamic Stylesheet loads but doesn’t finish
- Filter Select results based on selection
- Loop with slider (slider not loading)
- How to hide all child pages with post_query?
- How to sort posts based on the value (number) of a post’s metadata?
- Displaying Woocommerce Product Category in WordPress
- How can I add extra word in permalink when someone click download button?
- Increase offset while looping
- Blog posts repeat
- Woocommerce : Can’t get product info in loop
- remove post that has no content
- post thumbnail, conditions, else wont work
- wp_query get the 2nd post
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- How to add div blocks after certain set of post
- Why in my theme I can’t see all the statics content under the posts?
- How do I remove a category from a wordpress loop>
- How to unlink all posts from tracking same amount of views
- Why my loop isn’t working? [closed]
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Get all posts as an array ID => Name
- How to get post ID from button and pass title to Modal
- Problem with custom loop and wp_list_pluck [closed]
- Display child page content of a specific parent on home page
- Do not duplicate posts with multiple categories in multiple loops
- WordPress loop is not working
- Echo array value
- First post article different on Archives template
- How to add title attribute to archive items
- Strip from or something better?
- How to break up php code to avoid echo
- Search AJAX Filters – Multiple Query Loops Into One Loop (Optimization)
- Products listing check if meta checkbox is checked
- Pagination contents not changing in Front page WordPress
- in_array not working on dev server but works on localhost
- How to Create Carousel Indicators in PHP Loop using wp_get_attachment_url function?
- Get title of page containing post grid within the posts
- Is there anyway I can call the year once?
- Foreach Loop Of Post Types With Nested If Else If Not Completing Process
- Where does php code to load data go?
- cURL needing to loop through all “next_page”
- Display page content in different sections – based on page break block?
- Filtering custom posts by using checkboxes for taxonomy in an ajax loop always gives server 500 error
- Latest posts feed with a specific post always first
- Show the subcategory name based on current product
- How can I get my pagination loop to display the correct number of total pages?
- How do if all posts has this category ID then do this
- ERR_TOO_MANY_REDIRECTS / To Force SSL Logins and SSL Admin Access
- View tag description on page
- Get current_post in reverse order with pagination
- Insert div after every three posts in home.php [duplicate]
- Display product attributes for current product
- Div Missing In Custom Loop Query
- Loop 1 user randomly
- enumerating custom taxonomies?
- Using page template to fetch posts in page
- Create Customization Controls from Array
- Problems With Query and/or Template Part and/or PHP
- ACF loop and php formatting
- How to display thumbnail if post is assigned one otherwise not
- Pagenav Not appearing on custom Template
- Error trying import one category on page
- Remove the_content From Loop
- Custom Meta Box If Else Statement
- Adding if statement to content for homepage
- Tables not showing divs and loop/php items
- Alternative loop syntax error [closed]
- Pagination in category.php not functioning
- How to handle parent and child pages?
- How do I remove blog entries from home page Twenty Eleven child theme?
- How to create a loop that will display one post and stop?
- Woocommerce linking variations
- How to use a conditional statement in a post loop but not count towards the “posts_per_page” if false
- Saving meta box data from selected option’s value in database is not working
- How could I prevent using the same custom loop in a template file when I only need to change one meta_query parameter?