2

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

4

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.

3
  • it's works for me, but what about browser support? it's all ok or it's better not to use it?
    – Belial
    Commented Feb 9, 2018 at 22:16
  • 1
    Glad to help. The link i sent you shows browser support. It's fully supported except span on firefox... Please check answered if this helps!
    – rudtek
    Commented Feb 9, 2018 at 22:51
  • also, updated with a comment about mobile responsiveness
    – rudtek
    Commented Feb 9, 2018 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.