Grow your CSS skills. Land your dream job.

[WORDPRESS] Split the post content in two columns

  • # June 17, 2013 at 8:53 am

    Hi,
    I need to split the post content in two columns, I followed this tutorial [http://digwp.com/2010/03/wordpress-post-content-multiple-columns/](http://digwp.com/2010/03/wordpress-post-content-multiple-columns/http:// “”), second solution (Multiple columns by filtering the_content). I put that code in my functions.php and added the CSS but nothing happened. Is there something I do not do right? Thank you very much!
    My code to display posts is this:

    < ?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    “>< ?php the_title(); ?>

    < ?php the_category('title_li=' ) ?>

    < ?php the_content(); ?>

    < ?php endwhile;?>
    < ?php endif;?>

    # June 17, 2013 at 12:08 pm

    hello @luchid, don’t you want to use css instead? It’s much easier then, you can refer to this link http://css-tricks.com/snippets/css/multiple-columns/

    # June 17, 2013 at 12:13 pm

    It might be a solution, thanks!

    # June 17, 2013 at 12:22 pm

    Just post your code here or through codepen http://codepen.io/ if it still not working so I may help you. Good luck

    # June 17, 2013 at 12:43 pm

    Thank you very much, you are very kind helping me.
    I did followed the information you gave, it works great when having a paragraph but id does not work when putting the < ?php the_content(); ?>. I need to split in two the post content. This is my code for displaying posts:

    < ?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    “>< ?php the_title(); ?>

    < ?php the_category('title_li=' ) ?>

    < ?php the_content(); ?>

    < ?php endwhile;?>
    < ?php endif;?>

    # June 17, 2013 at 1:03 pm

    Thank you, [vhinmanansala](http://css-tricks.com/forums/profile/31582/vhinmanansalahttp:// “”) it works now. It was no need to put a class for the
    p.
    Thanks again!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".