This is an HTML/CSS question. Your PHP is mostly fine as is. You just need to remove the <br>
from your code.
Then, in your CSS, use ‘float’ to make the columns out of the divs. More info https://learn.co/lessons/css-column-structure-using-floats
Related Posts:
- Retrieve each widget separately from a sidebar
- How can i use the same template file with a widget and category loop?
- Problem getting current post tags to show in a widget
- is_active-sidebar loop
- Contact information footer
- New loop vs widget
- Pulling in featured image into default recent posts widget
- Need some help with “the_widget()” function
- Showing related posts (custom post type) outside of the loop
- Counting the posts of a custom WordPress loop (WP_Query)?
- Get post content from outside the loop
- 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()?
- Pagination not working on home page
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- save_post + insert_post = infinite loop
- Get ID of a page containing secondary loop in content
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- Are there any scenarios where the query_posts may be used?
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- Display subpages under parent page as a list within a loop
- When to use wp_reset_postdata();
- Exclude category by slug for for each loop
- Related Posts loop – offset
- WordPress Loop Through Particular Pages
- Display date only once for a each set of posts relating to that date
- Load comments per post on click with AJAX
- The main Loop is not starting in a custom blog template page
- Generating dynamic Tabs with multiple query post loop
- How do I override part of the main loop in my child theme?
- connect last post with first post
- Chopping up a large ajax request of around 200 posts [closed]
- Combining the_excerpt with the_content
- Custom loop with conditional statement to separate each terms
- Breaking the loop?
- How to get an array of years from all of the search results, and use it to filter by year the paginated loop?
- woocommerce stored variable
- Get search.php results in header.php?
- Recent posts on a static home page
- I write simple wordpress loop for taxonomy.php file but don’t show result
- A smarter way to display multiple loops inside a page template
- How to print out menu names in the foreach loop?
- How do I style the first two posts of a loop
- Do I need to use The Loop on pages?
- How do I paginate a get_posts() request inside another page loop (Paginating childpages)
- Is wp_reset_postdata() redundant after the main loop?
- Exclude first post (sticky or not) from the loop using query_posts()
- How to add a specific div element to the first post in a row?
- While loop with bootstrap [closed]
- Need to add class to first element in a foreach loop
- Scrolling Posts with Ajax
- Sort posts by first letter in the title, not by first number
- how to replace get_template_part(‘loop’,’tag’) with explicit styled version?
- What PHP Needed to Make One Loop with Multiple Styling?
- Simple foreach loop help needed in wordpress “the loop”
- How to create custom popup in shop page on every loop products?
- using wp_get_attachment_image_src in foreach loop
- Grabbed Post ID under WP loop, but still couldn’t Print Post title
- How to separate posts loop in to two columns? [duplicate]
- query_posts clarification needed
- Blank content php code not parsing advanced custom fields gallery add-on [closed]
- Three Column Loop
- Split loop into columns
- get_posts() forcing ignore sticky posts on main loop
- make diffrent template on last six post published
- “the_excerpt” in loop just keeps repeating first post?
- wpdb inside foreach loop only returns first result – 2 other similar cases found [closed]
- Using jQuery .after inside loop
- How to check all items in a loop have post thumbnail?
- Page Navigation Outside the Loop
- How to make the following loop break/stop when it reaches 2 posts (custom post types called Topics)?
- How to loop specific Category menu from archive page?
- How to display post tag on each post? [closed]
- How can I pass additional params to a shortcode while in a loop?
- Solved – Inserting content inside the WordPress loop
- Add Search and Filter functionality to custom loop
- Add all category as classes in foreach loop
- Exclude posts from loop by term
- is it bad to copy the loop for a template?
- I want to load post in bootstrap Modal dynamically
- WordPress Modal showing posts not working properly
- Query posts and display all dates in repeater field in chronological order
- Return only one post format in index.php [duplicate]
- How to display just video post format?
- Multiple loops in set intervals with code in between
- Modify widget to output posts in custom order
- How to execute custom loop before loop content?
- Sorting posts to make those with post thumbnail show up first
- Best way to check if a post with specific meta exists
- Limit article to 100 characters. Can’t use the_excerpt…
- Return only content in excerpt field in loop
- This webpage has a redirect loop issue with SSL page
- Buddypress Group Activity Loop Filter activity type [closed]
- get_posts and wp_autop (remove filter)
- Trouble preventing duplicate posts between 2 loops on homepage
- $do_not_duplicate is not working in genesis theme
- Loop displays current page
- Error in Wordprewss loop for page template [closed]