Hej
Jeg prøvede at overskrive index.php med single.php - så kommer billedet med det samme på, men må jeg dette, disse to script skal vel ikke være 100 % ens?
Er der en venlig sjæl der vil fortælle mig hvad jeg skal rette i, henholdsvis index.php og single.php er vist nedenfor!
På forhånd tak
index.php (hvor billedet bliver vist som x)
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
<?php query_posts("&showposts=2"); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="postdiv">
<h2>" rel="bookmark" title="Continue reading <?php the_title(); ?>"><?php the_title(); ?></h2> <?php edit_post_link('Edit', ' ( ', ' ) '); ?>
<div class="postop"></div>
<div class="blogpost">
<div class="entry">
<div class="fimg">
" rel="bookmark" title="<?php the_title(); ?>">
/images/posts/<?php $values = get_post_custom_values("Featured-Image"); echo $values[0]; ?>" alt="<?php the_title(); ?>" />
</div>
<div class="etext">
<?php the_excerpt(); ?>
<div class="entrydata">
by <?php the_author() ?> on <?php the_time('m/d/Y') ?> | <?php comments_popup_link('Read Comments (0)', 'Read Comments (1)', 'Read Comments (%)'); ?>
Filed under <?php the_category(', ') ?>.
</div>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="postdown"></div>
</div>
<?php endwhile; ?>
<div id="recententries">
<h2>Other Recent Entries</h2>
</div>
</div>
<?php get_footer(); ?>
Og her single.php som viser billedet korrekt
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="postdivsingle">
<h2>" rel="bookmark" title="Continue reading <?php the_title(); ?>"><?php the_title(); ?></h2> <?php edit_post_link('Edit', ' ( ', ' ) '); ?>
<div class="postop"></div>
<div class="blogpost">
<div class="entry">
<?php the_content(''); ?>
<div class="entrydata">
» by <?php the_author() ?> on <?php the_time('m/d/Y') ?> | Filed under <?php the_category(', ') ?>.
</div>
</div>
</div>
<div class="postdown"></div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<?php comments_template(); ?>
<?php else : ?>
<div class="postdivsingle">
<h2>404 - Not found</h2>
<div class="postop"></div>
<div class="blogpost">
<div class="entry">
<p>Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
</div>
</div>
<div class="postdown"></div>
</div>
<?php endif; ?>
</div>
<?php get_footer(); ?>