Hallo ich habe ein kleinen Problem und weis nicht weiter.
Für meine Internetseite: http://stagenine.de möchte ich wen man z.B. auf buchstabe a oder b usw. das die artikel alphabetisch sortiert sind, zurzeit werden sie aber nach dem jüngsten artikel sortiert.
ich habe folgende dateien wo ich ewt was ändern kann.
page.php, index.php, header.php, functions.php, footer.php, comments.php, sidebar.php und single.php
Hier poste ich mal den Inhalt von page.php:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
<div class="spacer"></div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>">
<div class="post-top"></div>
<div <?php post_class('post'); ?>><div class="post-content">
<div class="posttitle"><?php the_title(); ?></div>
<div class="entry">
<?php the_content('more...'); ?><div class="clear"></div>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div></div>
<div class="post-bottom"></div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
</div>
<?php get_footer(); ?>
und index.php:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
<?php if ( is_home() ) { ?>
<div class="spacer"></div>
<?php } ?>
<?php
if (have_posts()) :
$post = $posts[0]; // Hack. Set $post so that the_date() works.
if (is_category()) { /* If this is a category archive */ ?>
<h1 class="archivetitle">Archiv für die Kategorie ◊ <?php echo single_cat_title(); ?> ◊</h1>
<?php } elseif (is_day()) { /* If this is a daily archive */ ?>
<h1 class="archivetitle">Archive for <?php the_time('F jS, Y'); ?></h1>
<?php } elseif (is_month()) { /* If this is a monthly archive */ ?>
<h1 class="archivetitle">Archive for ◊ <?php the_time('F, Y'); ?> ◊</h1>
<?php } elseif (is_year()) { /* If this is a yearly archive */ ?>
<h1 class="archivetitle">Archive for ◊ <?php the_time('Y'); ?> ◊</h1>
<?php } elseif (is_search()) { /* If this is a search */ ?>
<h1 class="archivetitle">Search Results</h1>
<?php } elseif (is_author()) { /* If this is an author archive */ ?>
<h1 class="archivetitle">Author Archive</h1>
<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { /* If this is a paged archive */ ?>
<h1 class="archivetitle">Blog Archives</h1>
<?php } elseif (is_tag()) { /* If this is a tag archive */ ?>
<h1 class="archivetitle">Tag-Archive for ◊ <?php single_tag_title(); ?> ◊ </h1>
<?php }
while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>">
<div class="post-top"></div>
<div <?php post_class('post'); ?>><div class="post-content">
<div class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<div class="date">
<?php the_time('l, F dS, Y') ?> | Author: <?php the_author_posts_link('nickname'); ?>
<?php edit_post_link(' » Edit «','|',''); ?>
</div>
</div>
<div class="entry">
<?php if (is_search()){
the_excerpt();
}else{
the_content('more...');
}
?>
</div>
<div class="info">
<span class="category">Kategorie: <?php the_category(', ') ?></span>
<?php the_tags(' | <span class="tags">Tags: ', ', ', '</span>'); ?>
</div>
</div></div>
<div class="post-bottom"></div>
</div>
<?php endwhile; ?>
<p><?php wp_pagenavi(); ?></p>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Seite vor') ?></div>
<div class="alignright"><?php previous_posts_link('Seite zurück »') ?></div>
</div>
<?php else : ?>
<h1>Leider kein Begriff gefunden.</h1>
<p class="sorry">"Sorry, aber du suchst nach einen Begriff, der noch nicht in der Datenbank ist. Versuchen Sie etwas anderes oder melden Sie den Begriff bitte an Stage Nine..</p>
<?php endif; ?>
</div>
<?php get_footer();?>