Hallo,
Ziel für meine neue home.php ist es den neuesten Artikel (und nur den einen) in voller Länge darzustellen.
Alle anderen Seiten haben die Voreinstellung: 5 Posts untereinander darstellen
Ich kopiere einfach den Code der index.php in die home.php (ich hoffe das geht so?)
Was muss ich an meiner home.php nun ändern, um das o.g. Ziel zu erreichen?
Hier ist sie:
PHP
<?php get_header(); ?>
<?php $options = get_option('inove_options'); ?>
<?php if ($options['notice'] && $options['notice_content']) : ?>
<div class="post" id="notice">
<div class="content">
<?php echo($options['notice_content']); ?>
<div class="fixed"></div>
</div>
</div>
<?php endif; ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); update_post_caches($posts); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><a class="title" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="info">
<span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span>
<div class="act">
<!--<span class="comments"><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove')); ?></span>-->
<?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?> <span style="font-size:0.9em"><img src="http://www.makro-brief.com/wp-admin/images/print.jpg" width="23" height="19" align="top"><a href="?article2pdf=1">Drucken</a></span>
</div>
<div class="fixed"></div>
</div>
<div class="content">
<?php the_content(__('Read more...', 'inove')); ?>
<p class="under">
<?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span><?php endif; ?>
<?php if ($options['categories']) : ?><span class="categories"><?php the_category(', '); ?></span><?php endif; ?>
<?php if ($options['tags']) : ?><span class="tags"><?php the_tags('', ', ', ''); ?></span><?php endif; ?>
</p>
<div class="fixed"></div>
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<div class="errorbox">
<?php _e('Sorry, no posts matched your criteria.', 'inove'); ?>
</div>
<?php endif; ?>
<div id="pagenavi">
<?php if(function_exists('wp_pagenavi')) : ?>
<?php wp_pagenavi() ?>
<?php else : ?>
<span class="newer"><?php previous_posts_link(__('Newer Entries', 'inove')); ?></span>
<span class="older"><?php next_posts_link(__('Older Entries', 'inove')); ?></span>
<?php endif; ?>
<div class="fixed"></div>
</div>
<?php get_footer(); ?>
Alles anzeigen