• fuocorav

    (@fuocorav)


    Hi,

    https://csdr-cde.ca.gov/archives/

    It’s strange when I click on any categories or monthly links, it will keep pointing to the same post.

    What is exactly the problem? I’m afraid that I wiped out the important PHP query while I customized the home.php page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • moshu

    (@moshu)

    home.php shouldn’t have anything to do with it: the monthly and/or category archive lists should be displayed by the archive.php template file or (if it is missing) by the index.php. See: Template_Hierarchy

    Thread Starter fuocorav

    (@fuocorav)

    The archives template is listed below. It does appear correctly, but if I click on any monthly or category, it just goes to the recent post only. I’m newbie to this. It works before, but now, it doesn’t.

    See the archive template below:

    <?php
    /*
    Template Name: Archives
    */
    ?>

    <?php get_header(); ?>

    <div id=”page”>

    <div id=”content”>
    <h1 class=”pagetitle”>Archives</h1>

    <div class=”entry”>
    <div class=”archivepost”>
    <h2>Monthly Archive:</h2>

      <?php wp_get_archives(‘type=monthly’); ?>

    </div>

    <div class=”archivepost”>
    <h2>Category Archive</h2>

      <?php wp_list_cats(); ?>

    </div></div>

    </div>

    <?php get_sidebar(); ?>

    </div>
    <?php get_footer(); ?>

    moshu

    (@moshu)

    You are on the wrong track…
    archive.php and archives.php are TWO different template files!
    For the monthly and category listings Wp uses archive.php (no S at the end!!!)
    What you presented above should be the archives.php (notice the S) and it is a Page template that has nothing to do with displaying your monthly and/or category listings.

    Go back and visit again the link I gave above.

    Thread Starter fuocorav

    (@fuocorav)

    Thank you MOSHU! Sorry to be a pain in the neck….

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Archives keep pointing to one post only’ is closed to new replies.