最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Split post or page content in two or more columns

programmeradmin1浏览0评论

I'm not using a pagebuilder, this because I like to offer to any client a different layout for the contents. I have the necessity to split the contant of a page or post in two or more columns, I'm using bootstrap 4 and I want to create some layouts without the necessity to hardcode the columns or put the div inside the post content directly. Is this possible, how I can make it?

I'm not using a pagebuilder, this because I like to offer to any client a different layout for the contents. I have the necessity to split the contant of a page or post in two or more columns, I'm using bootstrap 4 and I want to create some layouts without the necessity to hardcode the columns or put the div inside the post content directly. Is this possible, how I can make it?

Share Improve this question asked Feb 12, 2020 at 16:32 sialfasialfa 32910 silver badges29 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

If you're using the Block Editor, use Core's column blocks.

If you're using the Classic Editor, make shortcodes for Bootstrap's rows and columns. When you enter content, you can then just enter

[row]
[column large="6"]First column content[/column]
[column large="6"]Second column content[/column]
[/row]

(You may find prebuilt shortcodes out in the wild since this is a common scenario. Or you may want to create your own as only you know which of the column widths you're likely to need.)

发布评论

评论列表(0)

  1. 暂无评论