• Im new to WordPress and think it will be a very good platform for me and I have a good magazine theme I am working with. My site is not live yet though. What I wanna do is keep the same categories on the front page at all times, regardless of new posts.
    For Example: I set my settings to display 4 posts per page and say I have 4 categories on my front page: CAT 1, CAT 2, CAT 3, and CAT 4. I have a new post in each one so my front page shows 4 different posts in 4 different categories, which is what I want. Now say on one day I make 4 new posts, but only in CAT 4. I will now have 4 new posts on my front page, but they are all from CAT 4 and the posts from CAT 1,2, and 3 have now been “pushed” off the front page because they contained no new posts.
    So how would I keep all categories on my front page at all times and have my latest posts only show up on the front page in their respective categories without pushing any of the other categories off?

    Sorry, Im a noob ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter roopress

    (@roopress)

    anybody? ??

    you will probably have to filter the posts and use multiple loops, adjusted with your theme…
    read also this answer

    Thread Starter roopress

    (@roopress)

    Thanks for the reply krembo. That is pretty confusing. Its gonna take me a while to study that. I’m pretty sure wordpress can do what I am trying to do, but since I’m pretty new to it I know it will take some time.

    Thread Starter roopress

    (@roopress)

    Any tutorials on how to accomplish this?

    Thread Starter roopress

    (@roopress)

    this is what my index page code looks like right now:

    <?php get_header(); ?>
    
    	<div id="content">
    
    <?php
      $the_query = new WP_Query('showposts=1&orderby=post_date&order=desc&cat='.get_option('featured_post_cat_id'));
      while ($the_query->have_posts()) : $the_query->the_post();
      $do_not_duplicate = $post->ID;
    ?>
    
    <div class="entry">
    <div id="post-<?php the_ID(); ?>">
    		<div class="postinfo">
    		<h4><?php the_category(', ') ?></h4> <h5> - <?php the_time('F j, Y'); ?> - <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></h5>
    		</div>
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    		<?php the_content('Read the rest of this entry &raquo;'); ?>
    		</div></div>
    <?php endwhile; ?>
    
    <?php while (have_posts()) : the_post(); 
    
    if  ( $post->ID == $do_not_duplicate ) { continue; update_post_caches($posts); }
    ?>
    
    <div class="entry2">
    <div id="post-<?php the_ID(); ?>">
    		<div class="postinfo2">
    		<h4><?php the_category(', ') ?></h4> <h5> - <?php the_time('F j, Y'); ?> - <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></h5>
    		</div>
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    		<div class="post2"><?php the_content('Read the rest of this entry &raquo;'); ?></div>
    		<div class="postbot2">
    		<h4><a href="<?php the_permalink() ?>">Continue ...</a></h4>
    		</div>
    		</div></div>
    
    <?php endwhile; ?>
    
    	<?php if (have_posts()) : ?>
    
    		<div class="navigation">
    			<p><?php next_posts_link('« Previous Entries') ?>
    			<?php previous_posts_link('| Next Entries » ') ?></p>
    		</div>
    
    	<?php else : ?>
    <div class="entry">
    		<h2>Not Found</h2>
    		Sorry, but you are looking for something that isn't here.
    </div>
    
    	<?php endif; ?>
    </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    ******************************************************

    what do I need to add to get it to do what I want?? I’ve read several articles on the Loop and still am having a hard time. Help Please!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to keep same categories on front page at all times?’ is closed to new replies.