Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter austraysia

    (@austraysia)

    Wow… yea that’s a nice trick!
    It worked just fine. I was kinda frustrated so I hardcoded everything… but this is nice =)

    Thread Starter austraysia

    (@austraysia)

    bump
    Need a function, which defines a post.
    is_single(”) doesn’t work.

    Thread Starter austraysia

    (@austraysia)

    Ok, I get it now.
    If I changed anything in single.php it only takes effect on a single post. Meaning: It only changed the post after I clicked on it.
    But if I want to change anything in the front page, I have to change the index.php file. But somehow it doesn’t work in the index.php file. It works fine for a single post.
    Anyone know how to remove timestamps in the index.php file for a single post?

    Thread Starter austraysia

    (@austraysia)

    Ok, I found out that it has nothing to do with the single.php file. I deleted EVERYTHING in the single.php file and it still shows all the posts, therefore it can’t be the single.php file which I have to edit… well…

    Thread Starter austraysia

    (@austraysia)

    Still need help, please!

    Thread Starter austraysia

    (@austraysia)

    bump

    Thread Starter austraysia

    (@austraysia)

    Sorry to bug again, but I still can’t figure it out.

    Thread Starter austraysia

    (@austraysia)

    bump

    Thread Starter austraysia

    (@austraysia)

    Hmm… ok, it actually didn’t quite worked as I thought it would.
    So, this is how the code looks like:

    <?php get_header(); ?>
    
    	<div id="primary" class="single">
    
    		<?php if(have_posts()) : ?>
    
    		<?php while(have_posts()) : the_post(); ?>
    
    		<div id="post-<?php the_ID(); ?>" <?php if (function_exists('post_class')) { post_class('entry'); } else {echo 'class="entry hentry"';} ?>>
    
    <?php if (is_single('118')) { ?>
    
    //nothing happens
    
    <?php } else { ?>
    
    // the code for you meta info
    
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    
    			<div class="entry-byline">
    				<span class="entry-date"><abbr class="updated" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php the_time('M jS, Y'); ?></abbr></span>
    				<address class="author vcard"><?php _e('by '); ?><a class="url fn" href="<?php the_author_url(); ?>"><?php the_author(); ?></a>. </address>
    				<?php edit_post_link('Edit', '[', ']'); ?>
    			</div>
    <?php } ?>
    			<div class="entry-content">
    				<?php the_content('[Continue reading ⇒]'); ?>
    				<?php wp_link_pages('before=<p><strong>' . __('Pages:') . '</strong>&after=</p>'); ?>
    			</div>
    
    			<p class="entry-meta"><span class="entry-categories"><?php _e('Posted in: '); ?><?php the_category(', '); ?>.</span><br />
    			<?php if(function_exists('the_tags')) { ?>
    				<span class="entry-tags"><?php the_tags('Tagged: ',' &middot; ','<br />'); ?></span>
    			<?php } ?></p>
    
    		</div><!--.entry-->
    
    		<?php include (TEMPLATEPATH . '/navigation.php'); ?>
    
    		<?php comments_template(); ?>
    
    		<?php endwhile; ?>
    
    		<?php else : ?>
    
    		<div class="entry">
    			<h2 class="entry-title"><?php _e('Not Found'); ?></h2>
    			<div class="entry-content">
    			<p>Sorry, what you are looking for isn't here.</p>
    			<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    			</div>
    		</div>
    
    		<?php endif; ?>	
    
    	</div><!--#primary-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    So, it says if it’s post 118 nothing will happen, otherwise the meta information will show. However the post with id=118 still shows all the information.

    Thread Starter austraysia

    (@austraysia)

    Thanks a lot!!!
    That’s exactly what I was looking for =)

Viewing 10 replies - 1 through 10 (of 10 total)