How I can split text in the_content() into 2 columns?

I need to split one paragraph of text into two columns in wordpress the_content(); I tried different tutorials, but they not work for me. Also I can’t use shortcodes.
Here how I need to make it done:
enter image description here

Now I have all of the text in one column.

1 Answer
1

Did you try css?

<div class="columncontent">
   <?php the_content(); ?>
</div>

Then the css:

.columncontent {
    column-count: 2;
}

Depending on your theme, you could just find a div already surrounding your content too.

There is all sorts of magic there!

https://www.w3schools.com/css/css3_multiple_columns.asp

The only thing I would suggest is that you use media queries, as the 2 columns may be a bit much on mobile. You’ll have to decide that and at what breakpoint you want to use.

Leave a Comment