you could rewrite the full code and use the build-in loop counter $wp_query->current_post
to fix the css classses and add a class for the first post per row to clear the float to prevent the ‘wacky sticking’;
example:
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php /* Start the Loop */ ?>
<div class="entry-content-<?php echo (( $wp_query->current_post == 0 ) ? 'main' : 'rest' ); if( $wp_query->current_post%2 == 1 ) echo ' left-post'; ?>">
<?php get_template_part( 'content', get_post_format() ); ?>
</div>
<?php endwhile; ?>
additional css:
.left-post { clear: left; }
Related Posts:
- Split columns into three+ divs?
- Make custom post column sortable
- Twenty Seventeen custom section – one column layout
- custom user table columns
- User sort by role administrator area
- Columns Block no longer appears when searching
- Columns are so narrow I can’t edit
- Background of panel changing to Blue [closed]
- Passing inputs from one column to the Other within a post
- How do I create a column down the right-hand side of my site?
- Why is this sortable filesize column in media library not sorting correctly?
- How to set ‘column-primary’ to backoffice 2nd column by default
- WP List Table custom column wrapping issue
- Virtual Composer: How to horizontally align contents from two different columns? [closed]
- Sortable columns by meta value holding a date – can’t get it to work
- Specify Table Column Width on a Page
- How to set value in a custom column in wordpress?
- How to have two column on my index page?
- Creating two Columns on a Page. [closed]
- Is there a way to create multiple columns of text with alphabetical ordering going down each column not across the columns
- Last Logged In Sortable Column
- Make a column full width in an inner section
- the_modified_author() returning blank
- Adding custom columns to custom post types
- Make custom column sortable
- Adding Category/Tag/Taxonomy Support to Images/Media
- Custom columns on edit-tags.php main page
- add_action ‘manage_posts_custom_column’ in a class [closed]
- Custom sortable columns ordered by meta-value?
- initial sort order for a sortable custom column in admin
- Add quick edit fields without custom colum
- Custom admin column disappearing when using Quick Edit [duplicate]
- wp_nav_menu, add class to every nth item?
- Remove the columns in media library
- Hide username from users list
- Custom admin columns for ALL custom post types
- Why is the new Gutenberg editor so narrow, and how to make it wider?
- How to show posts of an columnized different categories on the same line or row?
- custom sortable column
- Adding an email column to a Custom Post Types Admin Screen?
- Different “Text Widgets” in Sidebar on Many Different Pages?
- Can you have the users list pre sorted by specific column?
- Remove Post Page “View Post” Link
- Extend the wp_users table
- How to remove Gravatar from Username column
- How to add Edit | Delete button on rows?
- Adding menu_order to CPT admin page
- WordPress Custom Menu Widget Style
- 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
- Custom column sorting in WordPress admin post table
- Check if column exists for one table in DB
- Advanced Custom Fields: Sorting custom columns with custom fields sorts only by date
- Adding HTML tags or css classes to admin columns
- Add column in WP user but it goes wrong
- WP CPT Custom Sortable Column in Admin Dashboard Sort Order Random
- How to show first name and last name in custom post type columns
- WordPress make Grandparent and great grandparent filterable in custom columns
- How do I access the menus produced by Dashboard > Appearance > Menus
- 4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter
- Hide custom column in admin template screen (Elementor) [closed]
- How do I count columns on a custom WPDB query?
- Split function “the_tags” in 2 columns
- Pods CMS: How to add custom column to Adnvanced Content Type
- Custom Columns WordPress Admin
- Add custom column for custom field
- Custom Columns for Custom Post Type Manager
- Output column number according to active sidebars
- Excerpt showing under title in admin columns
- How to pull posts into two columns with different image sizes using $counter variable?
- WPMU add custom colum
- looping widgets to organize bootstrap grids
- custom field in admin columns
- Split multiple categories into two columns
- create 2 custom columns in page edit in Admin panel
- WordPress pagination with wp_query_columns
- Remove filter and view options from custom post type edit screen
- Search & column order by meta value in admin
- make two custom columns sortables
- Create a trailing block with programatically generated Gutenberg columns
- how can sort my column
- Custom column into custom taxonomy (img tag with slug-name as file name)
- How to sort custom posts including null meta-values in admin columns with meta_query?
- Sortable admin columns by 0.00 number
- Full width thumbnail
- Add button in admin columns
- Two blogs one page
- Change column of row action (Quick Edit) links in WP_List_Table
- Split custom post list into two columns
- How can I display only the post titles from a selected category in columns?
- Creating a new Sortable Column in WordPress Admin
- Make default template two columns?
- Can’t sort custom column on user.php by number / meta_value_num?
- How can I get on the same row two post of different categories?
- How to get blocks with same heigh in columns?
- Achieve the following layout
- How to sort custom sortable column by custom table value
- Sorting Users page admin column with ACF field