This will need to be customized for your situation but it should be helpful.
<?php
// Start the loop.
$i = 0; while ( $the_query->have_posts() ) : $the_query->the_post();
if ( $i == 1 ) : ?>
<div class="col-md-12">
<?php elseif ( $i == 2 ) : ?>
<div class="col-md-6">
<?php elseif ( $i == 3 ) : ?>
<div class="col-md-4">
<?php endif; ?>
<?php
// Include the carousel template content.
get_template_part( 'template-parts/content', get_post_format() ); ?>
</div>
<?php
// End the loop.
$i++; endwhile;
Related Posts:
- Adding ‘menu order’ column to custom post type admin screen
- Style custom columns in admin panels (especially to adjust column cell widths)
- How do I set the default admin sort order for a custom post type to a custom column?
- Replacing the title in admin list table
- Make custom column sortable
- Custom sortable columns ordered by meta-value?
- Add “Last Edited by” column to custom post type list table
- Taxonomy count per Post type
- How to add custom columns to Custom Post Type admin screen
- Count posts or custom post types from last 24 hours (or from today)
- Column sorting with emtpy meta values
- manage posts custom column is not populating data from meta boxes
- Count posts that have specific taxonomy term attached
- Count post that have specific meta value
- Custom admin columns for ALL custom post types
- order of date column in custom post type
- taxonomy list display custom post count
- Add custom column to custom post type overview in backend
- Count custom post types with a specific meta value
- Custom Post Type Category List & Post Count
- custom sortable column
- Custom Post Type, Two categories, Two columns with Pagination
- Taxonomy list. Order by a specific custom post type count
- Replacing the title in admin list table
- Get count of custom post type created by current user
- Remove Post Page “View Post” Link
- How can I add columns to custom post tables
- Custom Post Types: Custom columns with Title submenu?
- How to show custom (checkbox) field value in admin post list?
- Adding menu_order to CPT admin page
- Custom post admin filtering by post meta (the date)
- Admin Column Text Positioning
- How do I sort a custom post type admin column using two meta keys?
- Add Post Url to Manage Edit Screen
- get_queried_object error How to show post count by month in the taxonomy page
- Problem adding column to WC Subscription [closed]
- How to count custom post types with conditional operators
- Count posts with specific term_meta
- count_many_users_posts except current logged in user?
- Count all comments of a custom post type
- right_now_content_table_end function not working?
- WordPress count child posts of each parent custom post type and use in json array for google maps jquery plugin
- how to check if custom post type column already exists?
- Query/list all terms and their custom post count
- How to make sure content doesn’t display if selection is empty
- Adding HTML tags or css classes to admin columns
- Extending AZIndex plugin to use custom post types and custom taxonomies
- WP CPT Custom Sortable Column in Admin Dashboard Sort Order Random
- How to show first name and last name in custom post type columns
- Post count by month of taxonmy term
- custom post type category count shortcode
- Order a custom post type admin screen by a second custom post type title
- WordPress make Grandparent and great grandparent filterable in custom columns
- How to display author post count for multiple custom post types?
- 4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter
- Custom columns doesn’t appear in custom post type
- How can I use this code on a custom database table?
- Post loop count is not in order
- Problem with $post_id object’s property
- Pods CMS: How to add custom column to Adnvanced Content Type
- CPT Columns doesn’t show categories
- Getting post attchment URL to populate a CPT Admin Page Column
- I am trying to get cutom post cout by month of current taxonmy term
- how to count the current posts terms
- Custom Columns for Custom Post Type Manager
- Trying to add a class to post links
- How to count other posts not having specific taxonomy terms?
- WordPress Count posts within a custom post type
- Make a custom column sortable by a value from a different custom post type
- Display custom post counts for author , not default posts
- Sorting custom post types in edit.php : Post disappear
- Custom sortable column with WPAlchemy
- Remove filter and view options from custom post type edit screen
- Sortable column with custom data by date
- Add Content Column to Custom Post Type backend
- Hide Published text from custom post types column
- custom filtering admin columns
- display post count in archive page that have relation with another taxonomy term
- Display category filters for custom post type when category is shared by multiple post types
- How do I find the count of the current post?
- Custom sorting in post columns by ACF Pro Select Field
- get_queried_object not work in taxonomy page
- Get queried object for custom post type count
- How to show custom post count in archive page
- I have a problem with displaying children pages of custom post type
- Modify the category post counting function
- Making my custom column sortable
- conditional based upon the count of current user’s published custom posts
- Default custom column to off
- Taxonomy count per Post type
- Counting custom post type with wp_count_posts returns an empty object
- Change column of row action (Quick Edit) links in WP_List_Table
- Make custom post type column sortable
- How to add a post counter to the list of custom taxonomy terms?
- Split custom post list into two columns
- how to show Author post type count
- Complex Custom Loop with Includes
- Image size filtering in Media uploader according to custom post type
- Custom Taxonomy archive returns 404
- Using Custom Post Meta Values in Shortcode