I’m sorry Ivovic, I’m still waiting for that one moment in which PHP becomes clear to me. It all looks so simple, but I still don’t understand how it works.
My archives.php looks like this:
<?php
/*
Template Name: Archives
*/
?>
<?php get_header(); ?>
<div id=”content”>
<div class=”post”>
<h2><?php _e(‘Archives by Month’) ?>:</h2>
<?php wp_get_archives(‘type=monthly’); ?>
<h2><?php _e(‘Archives by Subject’) ?>:</h2>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?> `
and the page on which I want to show just a long list of all post titles in alphabetical order, now looks like this:
<?php
/*
Template Name: Archives
*/
?>
<?php get_header(); ?>
<div id="content">
<div class="post">
<h2><?php _e('A chronological list of reviews to scroll through') ?>:</h2>
<ul>
<?php wp_get_archives('type=postbypost&limit=1000'); ?>
</ul>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
The ‘working function’ to me seems to be get_archives and ordered postbypost, so that would mean that this is the place to ask for an alternative ordering, but this is obviously too simple a thought. The overview.php uses archives.php as template, but the result of clicking on the overview is not “archives by month” and not “archives by subject”, so obviously it is the overview.php which is used to find the information and order it. The plugin I mentioned earlier supposedly also uses the archives.php template but does result in an alphabetical list for one category. My Fluid Blue theme also has an archive.php which could also be responsible for the way the results are shown. This one is substantially longer than the archiveS.php.
If <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
is ‘the Loop’ why would putting that on top of the archive(s).php make a difference? Do the extra requests for a different output have to be put into ‘the loop’ or does ‘the loop’ make the page accept extra requests and what else does have to be changed in the archive(s).php to make it do what I want?
It bothers me that I can’t figure this thing out, while it looks so simple. I hope that some thing will make me understand the logic of it all so that I can start working on other things……………