WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working with this template (this is a demo), I need the post shown on the home to appear in two columns rather smaller in width.

Enclosed is my index.php code, I've tried everything by various forums and there is no way, my knowledge is limited if I can say that putting code in index.php and the css then I fix it myself.

<?php get_header(); ?>

        <div id="primary" class="content-area">
            <div id="content" class="site-content" role="main">

            <?php if ( have_posts() ) : ?>

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

                        /* Include the Post-Format-specific template for the content.
                         * If you want to overload this in a child theme then include a file
                         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
                        get_template_part( 'content', get_post_format() );

                <?php endwhile; ?>

                <?php athemes_content_nav( 'nav-below' ); ?>

            <?php else : ?>

                <?php get_template_part( 'no-results', 'index' ); ?>

            <?php endif; ?>

            <!-- #content --></div>
        <!-- #primary --></div>

Please help I have to submit the template in two columns and truly I've tried everything and can not do.

Many Thanks for your help.!

share|improve this question
Can you be a little more exact? There are 6 posts on the home page. How do you want them arranged in the new column? Should the fourth post move to the top right column or should posts 1 and 2 be side by side? What size should the images be in these columns? Etc. – Charles Clarkson Aug 8 '13 at 20:46
Hi Charles, Currently the template has 1 column in the center with the post (240 px) and another right column with the sidebar (widget). I need the post appear in two columns (120px + 120px) and on the right continious the sidebar (widgets), I can´t send a picture to explain it, tell me if you need any more information. thanks If you know the code of the index and css then I fix my measures, but only need the code. thank you very much Charles – Fran Aug 9 '13 at 10:15
The dimensions you describe do not match the dimensions of the columns of the page you linked to in your question (on my monitor), but I might get similar dimensions by narrowing the width of my browser window. You can post images to the web and provide a link by editing your question. – Charles Clarkson Aug 9 '13 at 15:39
The PHP you provided does not do the work of displaying the post content. That is done in the call to the get_template_part() function which includes the content of another PHP file. Before helping you with the PHP you need to know which scheme you will be using to make the two columns. Then you will know what, if any, changes need to be made to the markup. Two column layouts are discussed extensively on the web. Here is a similar question from Stack Exchange. – Charles Clarkson Aug 9 '13 at 15:41
You're welcome, Fran. When you have the time, please write your solution as an answer and accept it. – Charles Clarkson Aug 14 '13 at 14:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.