• Hi, how does one hide a post on the home page? Currently every post that I create defaults to showing up on the home page. I don’t want to show it there, but I do want to have it show up in another section of my site. Any way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter magicfun1

    (@magicfun1)

    I’m still a little unsure of how I would modify it to exclude posts from category ID 2 on my home page only.

    Here is my loop that I think I need to modify:

    function thesis_home_loop() {
    	$post_count = 1;
    	$teaser_count = 1;
    
    	while (have_posts()) {
    		the_post();
    
    		if (thesis_is_teaser($post_count)) {
    			if (($teaser_count % 2) == 1) {
    				$top = ($post_count == 1) ? ' top' : '';
    				$open_box = '			<div class="teasers_box' . $top . '">' . "\n\n";
    				$close_box = '';
    				$right = false;
    			}
    			else {
    				$open_box = '';
    				$close_box = '			</div>' . "\n\n";
    				$right = true;
    			}
    
    			if ($open_box != '') {
    				echo $open_box;
    				thesis_hook_before_teasers_box($post_count);
    			}
    
    			thesis_teaser($classes, $post_count, $right);
    
    			if ($close_box != '') {
    				echo $close_box;
    				thesis_hook_after_teasers_box($post_count);
    			}
    
    			$teaser_count++;
    		}
    		else {
    			$classes = 'post_box';
    
    			if ($post_count == 1)
    				$classes .= ' top';
    
    			thesis_post_box($classes, $post_count);
    		}
    
    		$post_count++;
    	}
    
    	if ((($teaser_count - 1) % 2) == 1)
    		echo '			</div>' . "\n\n";
    }

    could you help me out?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hide post on home page’ is closed to new replies.