Forum Replies Created

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

    (@seen)

    SOLVED

    Thread Starter seen

    (@seen)

    BUMP

    plz help

    Thread Starter seen

    (@seen)

    this my index.php for my theme and it still doesnt work.. any idea?

    <?php get_header(); ?>
    
    <div id="content">
    
    	<?php /* If this is a category archive */  if (is_category()) { ?>
    	<div class="notice"><p>You are currently browsing the <?php single_cat_title(''); ?> category.</p></div>
    
    	<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
    	<div class="notice"><p>You are currently browsing the archives for the day <?php the_time('l, F jS, Y'); ?>.</p></div>
    
    	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    	<div class="notice"><p>You are currently browsing the archives for <?php the_time('F, Y'); ?>.</p></div>
    
    	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    	<div class="notice"><p>You are currently browsing the archives for the year <?php the_time('Y'); ?>.</p></div>
    
    	<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
    	<div class="notice"><p>You searched for <strong><?php the_search_query(); ?></strong>, here are your results: </p></div>
    
    	<?php } ?> 
    
    	<?php query_posts('category_name=news');
    
    	if (have_posts()) : ?>
    
    	<?php while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    			<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    			<p><?php the_content('Continue Reading...'); ?>
    			<div class="post-details"> <h3>Posted <?php $elixir->timesince() ?> ago at <?php the_time() ?> by <?php the_author(); ?></p><a href="<?php the_permalink() ?>#comments"><?php comments_number('Add a comment','1 comment','% comments'); ?></a></h3></div>
    			</p>
    		</div>
    	<?php endwhile; ?>
    	<?php else : ?>
    	<div class="post" id="post-<?php the_ID(); ?>">
    		<h2>Nothing to see here</h2>
    		<p>You seemed to have found a mislinked file, page, or search query with zero results. If you feel that you've reached this page in error, double check the URL and or search string and try again.</p>
    		<p>Alternatively, a more personalized method of tracking down and searching for content can be found <a href="#bottom_box">below</a>.</p>
    	</div>
    	<?php endif; ?>
    
    	<div class="nextprevious">
    		<div class="left"><?php next_posts_link('&laquo; Older Entries') ?></div>
    		<div class="right"><?php previous_posts_link('Recent Entries &raquo;') ?></div>
    	</div>
    	<div class="clear"></div>
    </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    nevermind me.. i got it done.. i should edit my index.php -.-

    I still dont get it ??

    I would like to have my news category to be my static front page. On which file should i edit with query post?

    I have page.php on my theme. Should I edit it to something like this?

    <?php get_header(); ?>
    <div id="content" class="page">
    
    	<?php 
    
    	query_posts('category_name=news');
    
    	if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    
    		<div class="post" id="post-<?php the_ID(); ?>">
    			<h2><?php the_title(); ?></h2><br />
    
    			<?php the_content(); ?>
    
    		</div>
    	<?php endwhile; ?>
    
    	<?php endif; ?>
    			<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    
    		<?php comments_template(); ?>
    </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
Viewing 5 replies - 1 through 5 (of 5 total)