On the div that immediately wraps each post, you can use php to randomize the values instead of hardcoding the col-12
and col-sm-6
classes.
For example, you could change
<div class="col-12 col-sm-6 <?php echo $termsString; ?> grid-item wow fadeInUp">
to reflect the randomizer and then its result:
<?php
$randomColClasses="col-" . rand(8,12); //random value between 8-12
$randomColClasses .= ' col-sm-' . rand(4,8); //random value between 4-8
?>
<div class="<?php echo $randomColClasses . ' ' . $termsString; ?> grid-item wow fadeInUp">
Related Posts:
- Get date of last update outside of loop
- How do I get the attributes of a short code from a post?
- WordPress category & taxonomy loop with pagination
- Changing behavior of the loop twice in one page
- Show scheduled posts in archive page
- post__in – Placing content from a foreach loop inside of an array
- loop query exclude meta_key with meta_value
- “Blog pages show at most” in The Loop
- wp_insert_posts Fatal error: Maximum function nesting level of ‘100’ reached, aborting!
- Post Loop not Returning Permalink
- Displaying child page content of a certain parent
- Pagination adding extra posts only on page 2
- If Loop has odd number of posts on last page Custom style for last post in it
- add_filter() doesn’t work in loop
- The Loop in Static Page
- Content/Excerpt length control for a specific loop?
- Two loops by pre_get_post on same page
- How to check for specific content in comments in the loop
- Why we use if with while loop?
- Loop posts only excluding first post
- Loop repeating design pattern
- Sort Posts By Category?
- Can’t access login screen, wp-login.php 404’s
- Create a loop that gets pages with their template
- Why is my loop not dynamically grabbing the correct Category and displaying all categorized posts?
- Query posts if meta key starts with
- 3 Posts in Loop, Show Stickies First
- Loop within a loop (Again) for template
- How to use current_post to open a new unordered list every five posts
- Why cant you place the Loop outside of the index.php?
- sticky post in custom loop
- Rating system and changing the loop
- Pagination for multiple loops
- Ajax Button to load more Posts into a timeline
- How to target thumbnails of the first post in the loop
- Infinite Scroll on a loop?
- On single.php, fetch 2 posts created after and 2 posts created before in relation to the actual post (using menu_order)
- Problem getting current post tags to show in a widget
- How to style first post differently with ‘get_template_part’?
- Include multiple page ids in loop
- “Call to a member function have_posts() on array” error on have_posts();
- in Foreach Loop the Description is not showing?
- 404 Template customization | Want 10 recent Post on the 404.php error page apart from the error Notice
- How to exclude or filter password protected posts when using next_post_link() previous_post_link
- For each loop on every word in post
- Display name of taxonomy once
- Use have_comments() for current post instead of last post in loop
- Displaying the first, second, and third posts from a category in separate slides
- WordPress shortcode in content, output in sidebar?
- Using variable in WordPress loop as criteria
- WordPress Alphabetical Sort Loop Issue
- Call wp-blog-header.php header without performing a wp_query
- Display post formats differently on index.php (loop in function)
- Get_template_part() problem with the_content()
- How to output thumbnail twice in a loop
- Frontpage pagination by week
- Integrating WordPress with Your Website
- Fetching posts from wordpress function in ajax
- Saving return value from the_author_posts_link()
- Display more than 10 posts on author.php file
- Accessing the Posts page Content
- how to run loop in function.php that sends email based on specific conditions?
- How to use this $tax_selection variable in this custom loop?
- Display all categories as plain text
- Query post & loop problem.
- How to sort a loop after most viewed
- How do i create a loop that list and divide posts into months?
- Forcing page to top of the list when using get_pages
- How to display fields from the loop in two separate divs
- WordPress posts loop not displaying all posts on blog
- get_page_by_title not working inside fucntions.php
- Duplicate posts on archive page
- Bootstrap tabs are not being clicked in WordPress loop
- Get gallery in loop through ajax
- Get a specific size from wp_get_attachment_image_src
- Pagination on a underscore custom theme
- Build a Page which shows the Oldest Post with specific Custom Field Value
- WordPress multiple loops with default pagination
- Loop random posts and display odd and even based on two alternating meta values?
- Work arounds for conditional checks inside the loop in search.php?
- adding tax_query to $query_string
- Get Sticky User in user loop based on user role
- Popular posts with Varnish ESI
- Querying posts from only one category and exluding the latest post
- Remove posts_orderby filter then add it back in
- WP update_post_meta link loop
- query_posts ignores the argument
- Need some help with “the_widget()” function
- Conditional Check in The Loop’s Parameters
- How does the JSON API work to parse incoming JSON and fetch a post based on an ID?
- How to add excerpt in loop in Twenty Eleven theme?
- Exclude Authors based off date of last post
- Loop from another WP site onto mine
- Having issue with WordPress loop
- How to implement template file and the loop
- Show only posts from todays date [duplicate]
- Wrap every 2 divs in row – for each loop [closed]
- How to add class to the last image of the last post in a loop
- Why did my most recent article fall behind an older one on my site?
- I make sticky post for my archive page for custom post type with ACF field and loop is not working