There are multiple ways to that but what I like to do is to create shortcodes e.g [one_half] :
function one_half_sh( $atts, $content = null ) {
return '<div class="one-half">' . do_shortcode($content) . '</div>';
}
add_shortcode( 'one_half', 'one_half_sh' );
Then the CSS can look like this :
.one-half {
width: 48%;
margin: 0 4% 0 0;
float: left;
}
The second column would have the same markup but with 0 margin.
This allows to set a very flexible layout you can customize on each post.
EDIT: for the second column just create another shortcode with exactly the same code but add a CSS class such as .second-col
you will style in your stylesheet
Related Posts:
- I am unable to publish/update post
- Unable to restore from backup – how to obtain old blog posts?
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- Change modified date to current date when title updated automatically
- How to show the posts list into a static page? Problems to use the loop into a static page
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- get_the_excerpt() is not working as expected – returns wrong text
- Show posts by a custom post author
- Custom loop pagination links not working
- Prevent Delete Attachment by URL or When Submit
- How to use format post in a pertinent way
- Enable Comments Box On Custom Post Type
- wp-cli post create & media import issues
- How can i limit the number of posts created per category?
- Search results posts_orderby and ID
- Getting Custom Post Loop to display in Bootstrap 3 column grid
- Turn On Comments On Custom Post Types in Directory Theme
- WordPress custom Query for Posts in Category display posts multiple times
- Responsive images with custom image size
- Making a custom Pagination for multi page blog post
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- Editing the default page to show all posts, rather than most recent ones
- Automatically add date to the auto generation of post slug
- Permission issue with custom post type – not added to menu – by plugin
- Duplicate Custom Post Type and Taxonomy Slug
- How could I change my Permalink from blog to custom structure? [closed]
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Take a received feedback item, turn it into a post
- Getting value from get_post_custom
- WP Admin register taxonomy and post type performance
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Calling Different Custom Post Timestamps in a table
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Admin – create custom post status and display above table
- custom post template file not shown, instead all the time 404.php
- Set Default Category to Username
- Disable sticky option for specific categories
- How to allow visitors to filter posts by multiple taxonomies
- show custom post type category dropdown sorting result on same page
- Custom Post Type Rewrite To Include Parent Page(s)
- Highlight static blog page link in header
- Thumbnail & Category link aside post
- Redirect to another page using contact form 7? [closed]
- How to create a template for Pages?
- How do I do a page break?
- How to include my own css in post
- Custom post types related to same custom post type?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Block editors annoying warnings
- Is it possible to customize the post according to post format in single.php?
- Customize rel=canonical tag for single blog post
- a little direction on custom post type
- disable Tab post on nav-menus page (Admin)
- What does WordPress do if I save a post without content/title? [duplicate]
- How to add a class to edit_post_link?
- Format latest/newest post differently
- Custom taxonomy archive page problem
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Tell WP to use a specific template file in posts
- Admin – no Featured image choice in create new/page|post
- relating business and products with custom taxonomy?
- Best Way to Add UnEditable HTML to Posts
- How safe is it to delete old posts edits to save database space?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Using setup_postdata() with multi-dimensional array
- Is codex right on deleting post?
- Check if a custom post type has already been created
- WordPress Query Posts From Category Post on Static Page
- Edit multiple custom post types while saving a new or edited post
- Create a custom posts page
- how to hide empty fields of post category description?
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- if in category but only with post meta
- How to get different Related Posts
- How to add convenient buttons for new custom post statuses
- How to allow multiple thumbnail upload for Posts?
- add external project to web site wordpress on production
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- Show custom post with custom categories with specific slug
- register_post_type permalink
- Display the 2nd category name of a custom post type without error if its null?
- Auto delete posts based on content text
- How to call posts under a specific category on static front page?
- Querying another post category to match current post and display in loop
- Custom home page with full post for first one only
- Custom Post Limit for homepage only without plugin?
- Give posts a particular template based on the assigned category
- Display Featured Posts Grid on Static Page (Gazette)
- Display value of custom field at the beginning of a post
- how to handle the loop using filling bootstrap grid structure?
- l accidentally permanently deleted a Draft. There’s any way I can recover it?
- datepicker value in mysql
- Inserting an example of the last 3 post on to the homepage
- Static pages not working
- Optimize CPT-function with a loop