Viewing 1 replies (of 1 total)
  • If you are not an experienced PHP programmer, this could be a bit much to tackle. Here is a general outline of what needs to be done.

    Each of the 4 posts will need a block of code similar to this:

    <?php $temp_query = clone $wp_query;
    <div class='leftbox'>
       $more = 0;
       query_posts('category_name=jobseeker&posts_per_page=1');
       if (!have_posts())
          echo "Sorry, no Job Seeker message today."; ?>
       <?php while (have_posts()) : the_post(); ?>
          <div class="post" id="post-<?php the_ID(); ?>">
             <h4><?php the_title(); ?></h4>
    	<div class="entry">
                <?php the_content(); ?>
             </div>
          </div>
       <?php endwhile;
       ?>
    </div>

    The $temp_query = clone $wp_query; will be done only before the first block. After the last block, use $wp_query = clone $temp_query; to restore $wp_query.

    The div class=’leftbox’ will alternate with div class=’rightbox’ to put the posts side-by-side. The classes must be defined in your CSS file for the correct alignment.

    Replace the category_name in each block with the desired one for that block. Alter the ‘No message’ statement as needed.

    Hope that gives you enough to go on.

Viewing 1 replies (of 1 total)
  • The topic ‘How to add 4 posts to home page of website?’ is closed to new replies.