This isn’t really a WordPress related question, and you can get your desired result by a simple PHP loop:
$i = 1;
foreach ($array as $var) {
if ($i==7) {
// six items already displayed.
// Do whatever you want here
// now restart the count
$i = 1;
}
// display your thumbs or whatever
// increment $i
$i++
}
Related Posts:
- How to get post creation date?
- How do you add Read more … link to posts?
- Get current menu_order
- Confirmation box when submitting post for review
- Setting Custom Sort Order of Posts within a Category
- Display post number not post ID number
- has_archive=false on the default post type
- How do I detach images from posts?
- Change slug with custom field
- adding a custom css class to post
- Insert custom div between posts
- How to Display Post View Count
- Remove double space after a period
- get_post_type_archive_link(‘post’) returns current category archive
- Displaying the number of posts in a custom loop (without including the number of posts of a loop below)?
- display order of connections
- Conditional that checks if a current category has any subcategory with posts
- Unwanted Duplicate Posts Showing in Pagination Pages
- How to activate Markdown in a local installation of WordPress 4.3?
- Downgrade user from role that allows post creation
- How to store an extra (surrogate) ID when creating a post with wp_insert_post?
- Add code just after Post content
- Alternating post layout
- Check to see if specific loop has less than certain amount of posts
- Articles are text-only in any “Category” instead of HTML
- Auto insert More tags in all posts
- Get current category id from post page wordpress
- Sticky post appears twice
- Ajax load more button in Recent posts widget
- How to change post status from frontend?
- How to show last post of each website of a MU wordpress in HomePage
- Change user role when post approve
- Retrieve value between 2 post
- Adding buttons to Add New Post and Add New Page
- How to display content from the main blog on another from multisite network as it would be its own
- After database migration, posts not showing up in dashboard
- how to replace source ” https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css” in the wordpress backend?
- Editing the default page to show all posts, rather than most recent ones
- Post Loop Missing Most Recent Post
- Static posts page with home.php
- Start WP Pagination From Number 1 in URL
- How to make a bilingual front-end post using the plugin WP User Frontend and Polylang or qTranslate?
- Avoiding “Missed Schedule” errors when inserting future posts
- How to get posts from a current post’s month?
- How to display two random-post sections that are each under their own category
- Using setup_postdata() with multi-dimensional array
- Show metabox value last post excerpt, title and link
- Tags on products vs tags on blog posts. An easy way to duplicate them
- Deleting post specific content at beginning of post
- Change Post Title For Specific Category
- How to display the requested post only?
- Export all posts to import as product items
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Prevent duplicate pages from being added
- Can I style single post that are in multiple catergories?
- Show 10 latest posts only from users with contributors role
- Mailing list submission from a post that doesn’t have a form on it
- Older blog posts not showing up on WordPress
- Embedding Post Editor Into External Site
- Show single post child category from a determined parent
- How to show posts in grid style on search result page?
- My website is showing today’s date instead of published date since db migration to a new wordpress
- How can I change the date format of the revision list?
- Go back to the exact post page number
- Pagination Stops
- How to mark only one post as Featured post?
- Remove status ‘archived’ from the default post and page view
- How to invoke a HTML custom button based on a HTML dropdownlist menu
- Parent menu item does not display posts when I add the sub-items
- Post data across WordPress sites
- Mix post date with post meta value using WP_Query
- Custom Post Types and Broken Permalinks
- The first post appears twice
- Find post tags words in post content and link them to tag URLs
- Check if user has avatar
- How can I filter the post of a CPT by taxonomy Term in admin meta-box dropdown?
- Show Posts By Custom Field
- Hide title in Merlin Theme on posts and pages only
- Custom plugin to get related posts by category
- is_archive() not working on selected “Posts page”
- Relative Image Urls in Posts are starting from root – Not from WordPress Address (URL) at General Settings
- How to associate media with a post?
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Apply comment to different post (not the current post) [duplicate]
- When Author add new post change default status to pending
- Adding custom fields to the Quick Edit screen – puzzled about the column concept
- fire action when post is being edited as well as saved?
- Make a custom URL and link to custom Template
- How to get all post titles starting with numbers and symbols?
- thumbnail image path and file path for gallery thumbnail images
- How to display a certain template element only for posts published within certain time range?
- Displaying warning if no featured image has been set – Post Editor
- How to highlight most recent posts in a list
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- How to add a new page that will function as a separate blog/news article page
- How to set value in Query Loop?
- Wp_query WooCommerce products
- No matching template found when using single.php
- Site ‘Categories’: save an admin global setting with post metadata [closed]
- I cannot see the pagination in /wp-admin posts page