Support » Themes and Templates » One and Two columns posts on the same page

  • Hi all

    Am new to WP and starting to learn this powerful application. My apprenticeship is going great but now I’m stuck with an issue concerning custom posts. What I want to achieve is to display multiple posts; 1 column post and 2 and 3 columns posts at the same time on the same page. I’ve google this term with no success. I also want to know how to create the script to know which type of post I’m creating such that it displays in the way I want it to appear on the page. I also want to have a title for each post.

    I found some helpful plugins for page/post columnist but this isn’t what I want right now.

    Please see the image what I want to achieve to better understand my problem.

    Waiting for some feedback and a solution.


Viewing 12 replies - 1 through 12 (of 12 total)
  • The key to beginning to understand this is using the loop multiple times. Look in the Codex here. The loop has to be rewound so it can go again. Then u can put multiple instances on a page and wrap yr layout around them.

    can you show me an example please :D, am still a novice and eager to learn that

    all the expo and examples are here

    thanks, i’ll have a look and learn from this point and revert back if need be.

    Thank you for taking the time answering my question

    For yr level of functionality you need to understand the loop and its variables. Its all there.

    Hi Ben,

    I tried emailing you after your contacted me through my blog but my Gmail emails are being bounced.

    The exact code will depend on your particular situation but the basic idea is to use multiple WordPress loops for the different areas of the page you’re displaying content in and PHP “switch” code to alternate in the different columns.


    Wow, hi Rachel how did you found me from nowhere šŸ™‚

    Thanks indeed to channel me thru the right tunnel…I’ll have a read on multiple loops as you both have suggested and hope to be able to help myself to solve this problem.


    Hey there

    Now I’ve read about the loop etc . I’ve succeeded to create custom post types noe and my main concern now is to publish this post on my homepage with a particular css. I read about how to query such post but I’m getting mingled. can yu help me please I’m testing the twentyten theme here

    My custom post type is here

    Please help me with the codes.


    What I want to do is to have normal post as well as custom post types on the homepage or numerous custom post types as depicted here

    Please help me guys :))

    if( is_home() ){
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    query_posts( array(‘post_type’=>array( ‘post’, ‘linkpost’),’paged’=>$paged ) );

    is that the correct code yo input in the index.php? Or shall I use a static homepage? How to do it with the various types of posts I’ve got (from my screenshot (

    I figured it out now I need to get those custom posts styled on my homepage!

    Can you help me on this one pls?

    Am using this piece of code to display my custom posts on the homepage

    add_filter( ‘pre_get_posts’, ‘my_get_posts’ );

    function my_get_posts( $query ) {

    if ( is_home() && false == $query->query_vars[‘suppress_filters’] )
    $query->set( ‘post_type’, array( ‘post’, ‘page’, ‘album’, ‘movie’, ‘quote’, ‘attachment’ ) );

    return $query;

    When I use this piece of code in WP 3.03, it displays perfectly on the homepage. But when Iā€™m assigning a page template for the custom post type to a page is displays all the custom posts like on the homepage. Is there a way to suppress that function allowing the display of selected custom posts only on the homepage while the other pages display only the assigned page template?


Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘One and Two columns posts on the same page’ is closed to new replies.