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?
- Remove Categories / Tags From Admin Menu
- Setting Custom Sort Order of Posts within a Category
- Custom permalink structure only for default posts
- Exclude drafts in all() view of edit.php
- Is this the best (and only) option to style CSS for a given post type?
- Sort post by attributes ‘order’
- How to change the layout and styling of posts according to their category in WordPress?
- adding a custom css class to post
- Prevent duplicate posts in wp_insert_post using custom fields
- Add default content to post (for specific category)
- Pagination not working on Custom Page Template
- How do I change the gallery that is inserted in the post?
- Posts Page Featured Image [closed]
- display order of connections
- same template for multiple custom post type single
- How to place HTML below the title of the (custom) post overview
- How to get a nofication when post submitted
- Convert a complex webpage into WP theme
- .current-menu-item class on custom post type children pages – again?
- Display page content AFTER a loop of posts
- Run a function when post is deleted?
- How can I create custom button in post.php
- how to replace embedded “full” sized images within a post with the “large” ones
- Downgrade user from role that allows post creation
- Best way of deletion of old posts [closed]
- Animated gif for a thumbs
- Admin Notices don’t display on the admin screen for certain post
- Custom WordPress Theme: Publish Date and Display Date for posts right beside each other
- Get posts of ONE taxonomy term of custom post type
- WordPress Custom Fields (Checkboxes with multiple values)
- Custom Post Archive Page not working
- Exclude category from
- Adding buttons to Add New Post and Add New Page
- get_the_excerpt() is not working as expected – returns wrong text
- WordPress custom Query for Posts in Category display posts multiple times
- 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
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Custom post types related to same custom post type?
- Format latest/newest post differently
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- relating business and products with custom taxonomy?
- Using setup_postdata() with multi-dimensional array
- 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
- How to allow multiple thumbnail upload for Posts?
- add external project to web site wordpress on production
- Post titles and thumbnails as links to custom post types?
- Custom Post Type, post-formats associated to custom post type > 404 archives
- Adding a custom post type meta field to rss
- How do I allow certain users to make a certain type of post?
- Delete post from admin but not from database
- Custom Select Query – Selecting the Year?
- What would causes search to return incorrect results?
- get posts, run a custom query, and join the results
- How to pull latest posts from a specific category
- Problem paginating a subquery on a post
- Some custom post types did not return an object
- Tag for custom post type
- Show post count in custom taxonomy page
- Post relationships/nesting
- Manual Scheduler For Custom Post Type
- Dev and prod on the same database- dev version active for IOS
- How to delete/customize imported demo content from a theme or add my own?
- Integrate video and iframe in a post type gallery
- How to put the WordPress blog into theme
- Displaying a specific sub-category’s posts from wp_query
- Displaying dynamic content (blog posts/portfolio) on a static homepage and keep the blog post styles
- single- and archive- templates not being applied to custom post types, not even after flushing permalinks
- Multiple Custom Post Type loop logic
- WordPress search for specific Post Type
- How can you control what a user is allowed to post in the backend?
- Post are not showing up
- How to show content of specific item on the same page?
- Blog styling in SASS
- How to list all names and descriptions of a custom taxonomy
- How can I have the posts from one word press blog show on the presentation page of another word press site
- Show a Category Specific Info Box
- How to create three columns from selected posts
- Make a custom URL and link to custom Template
- Special Query: Title, Terms, Content – %LIKE%
- Get most recent posts by category that aren’t first overall [duplicate]
- First Custom Post Custom Fields Empty After New Custom Post
- WordPress 3.2 – Problem with WYSIWYG editors in a custom post type?
- How to have more post in a page than in your home page
- Wp_query WooCommerce products
- Only show posts belonging to multiple cateogries at same time
- No matching template found when using single.php
- WordPress Ajax load doesn’t work
- WordPress Custom Post type csv exporter
- Edit Page button is gone