The code that makes this a two-column layout is centered on the $st_cat_counter variable. This is incremented with each iteration and when it’s an even number ($st_cat_counter / 2
) a row is closed and a new row is started:
echo '</div><div class="row">';} elseif ($st_cat_counter == 1)
You should simply be able to change “/ 2” to “/ 3”. This changes the break point from every 2nd item to every third item. CSS changes and other edits will be likely to finish the job.
Related Posts:
- How can I custom order the results from wp_list_categories?
- wp_list_categories: get latest featured_image of category
- Exclude category by slug for for each loop
- Display page of custom posts?
- Showing current subcategory
- Why is my loop not dynamically grabbing the correct Category and displaying all categorized posts?
- Publish Categories for a particular Author on a given Post
- Loop Problem: Displays same set of post for all categories
- Category ID returns as ‘0’?
- Exclude category from get_the_category
- Display all categories as plain text
- loop inside a loop : search for posts in the same category
- Show all child categories associated to post ID within loop
- Secondary loop cuts off at 10 posts?
- My custom query not detecting the correct category
- Show last post from multiple categories using wp_list_categories
- loop mix my child-category and parent-category
- How to fix pagination for custom loops?
- Jquery Slider for profile template
- Counting the posts of a custom WordPress loop (WP_Query)?
- if ( is_home() && ! is_front_page() )
- Get excerpt using get_the_excerpt outside a loop
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Get post content from outside the loop
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Display featured products through custom loop in woocommerce on template page
- Split Content and Gallery
- Get the children of the parent category
- How to get Author ID outside the loop
- How can i display the content in plaintext
- How to check if I’m on the last page of posts?
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Is there any difference between the_title() and echo get_the_title()?
- AJAX with loop filtering categories
- Do I need to use The Loop on pages?
- Remove the Homepage Query
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Retrieve each widget separately from a sidebar
- Why am I being limited to ten posts on a custom loop?
- Should category.php and The Loop be used if the query needs to be customizable?
- Should I use loop in the single.php file?
- Inject post (from specific category) between posts in Loop
- A search for ‘0’ returns results
- Exclude the category from the WordPress loop
- Why do themes rely on “The Loop”?
- How do I get the category URL from get_the_category?
- Display all posts from specific categories on a page
- How to return loop contents
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Cleanest Way to Select Every Second Element in a Loop?
- How to show list of posts by author and category?
- Insert image or ad script after 3 posts using the loop
- Get date of last update outside of loop
- Pagination not working on home page
- Child Pages Loop
- How to place comments_template(); outside the loop?
- Multiple Loops Homepage?
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- get_field not displaying my custom field value
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- Default WP Gallery – show only galleries of a certain category
- How to get the first image gallery of a product in woocommerce in a loop
- Get post by page name or slug
- save_post + insert_post = infinite loop
- Rearranging posts based on categories
- WP_Query not looking at child category
- Loop.php vs looping inside template file
- Get ID of a page containing secondary loop in content
- Randomise results from a category page?
- Custom Loop and Infinite Scroll
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- Display all posts in category, with specific tag posts at top
- Are there any scenarios where the query_posts may be used?
- the_content and wp_link_pages
- Show div only if post is in specific category
- Adding ‘current_post_item’ class to current post in the loop
- How do I get the attributes of a short code from a post?
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- WooCommerce Product Page Loop – Output All Product Thumbnails
- wp-admin redirecting to https, denying login
- Endless loop with wp_insert_post and wp_update_post
- How to show a category post to a specific registered user
- Display list of Sub-Categories and the posts they contain, within one main Category
- how do I group content in magazine-style ‘issues’?
- Loop with Dynamic Categories
- Display subpages under parent page as a list within a loop
- Why is it necessary to call rewind_posts() when using the loop more than once? [duplicate]
- When to use wp_reset_postdata();
- Is including the loop necessary for page.php? [duplicate]
- the_title(); works in a page template, outside the loop. Why?
- wordpress loop for specific category
- Add 20yrs to post date, and then query
- Why do themes have `while( have_posts() )` in templates like single.php?