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
- 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?
- Custom columns for taxonomy list table
- Replacing the title in admin list table
- Make custom column sortable
- Adding Category/Tag/Taxonomy Support to Images/Media
- Custom columns on edit-tags.php main page
- Custom column for changing post status via ajax
- add_action ‘manage_posts_custom_column’ in a class [closed]
- Custom sortable columns ordered by meta-value?
- sortable custom column in media library
- Add “Last Edited by” column to custom post type list table
- Modify column_author in WP_Comments_List_Table
- Add new column to sites page
- initial sort order for a sortable custom column in admin
- Add quick edit fields without custom colum
- How to add custom columns to Custom Post Type admin screen
- Sortable admin columns, when data isn’t coming from post_meta
- Column sorting with emtpy meta values
- Hook to edit an column on comments screen?
- manage posts custom column is not populating data from meta boxes
- Custom admin column disappearing when using Quick Edit [duplicate]
- Split content into multiple columns using more tag?
- 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
- order of date column in custom post type
- Gallery Settings Change available Columns
- How to get my loop to pull posts into three columns
- Pages with 2 Columns
- Custom taxonomy – custom sortable column
- Add custom column to custom post type overview in backend
- Display Custom Taxonomy in Sidebar in Two Columns
- 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
- Set div columns in a loop by post count
- Adding an email column to a Custom Post Types Admin Screen?
- Custom Post Type, Two categories, Two columns with Pagination
- Different “Text Widgets” in Sidebar on Many Different Pages?
- Replacing the title in admin list table
- Can you have the users list pre sorted by specific column?
- Remove Post Page “View Post” Link
- How can I add columns to custom post tables
- Extend the wp_users table
- Taxonomy Custom Column – ‘manage_{TAXONOMY}_custom_column’ filter only passing 2 arguments
- Is it possible to create column width presets in Gutenberg?
- How I can split text in the_content() into 2 columns?
- Remove “Comment” column in all post-types
- How to remove Gravatar from Username column
- Custom Post Types: Custom columns with Title submenu?
- Replace existing content from specific WooCommerce admin orders list column
- How to add Edit | Delete button on rows?
- how to display “Edit | Quick Edit | Trash | View” in custom WP_List_Table column?
- How to show custom (checkbox) field value in admin post list?
- How to add a column to the Trash page?
- Adding menu_order to CPT admin page
- WordPress Custom Menu Widget Style
- Custom post admin filtering by post meta (the date)
- How to make 2/3 width column in Gutenberg
- 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
- Problem adding column to WC Subscription [closed]
- How can I add buttons to a custom column in the taxonomy table?
- WordPress Theory Lesson – Image Columns within posts with alignment?
- How do I change the default sort order of a custom column on the posts page?
- Calculations in functions.php [closed]
- manage_posts_custom_column, showing serial number using increment in loop
- User Last Login Sort Column
- Add Sortable Column For All Post Types
- Manage users custom column add class “num”
- Vertical alphabetically post columns