WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Where do the ARCHIVE pages come from? (8 posts)

  1. klynam
    Member
    Posted 3 years ago #

    I'm using a (self-modified) template for the following site:

    http://www.joshhalltattooer.com/home/

    As you can see, the default Archive widget is being used in the sidebar.

    When clicking on any link in the archives, a new page is created listing all the entries for that month.

    WHAT IS THIS PAGE BEING CREATED FROM AND HOW DO I MODIFY IT?

    I cannot find anything in my theme/template files that is being called.

    I also tried created an actual Archive page and Archive template. That page works fine and lists all the links shown in the sidebar.

    But again, when a link to any month is clicked, this same "listing" page appears.

    How is this page generated? I'm stumped ?!?!?!?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    have a look at http://codex.wordpress.org/Template_Hierarchy

    time archive pages are created by:

    date.php -
    if date.php does not exist, by archive.php -
    if archive.php does not exist, by index.php.

    if you want to customize the design, make a copy of index.php and save it under the name date.php - then edit date.php

  3. klynam
    Member
    Posted 3 years ago #

    Thank you for that information.

    I did what you suggested: make a date.php file as a copy of index.php. Unfortunately this had the same results. I suppose this isn't surprising since it was a copy of the index.php file and according to the hierarchy you directed me to, this (archive) list page was ultimately calling the index.php anyway.

    So essentially, my problem remains: when WP lists my archives - either using the index.php or my new date.php file - all the content is being pushed to the top of the page.

    That seems to suggest a problem with my index.php not correctly calling the header.php or something...???...although it looks like the call is right there on line 1 of index.php.

    Thanks again - I'll keep digging...

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    looking at your links, the one thing is that the image in the header is not displayed in the archive page; probably because of its relative path;

    instead of:
    <img src="images/top-logo.jpg" width="800" height="165" border="0">

    try:
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/top-logo.jpg" width="800" height="165" border="0">

  5. klynam
    Member
    Posted 3 years ago #

    Hmmmm, very interesting...

    If my new date.php file is a copy of the index.php file, the page content appears one way.

    If my new date.php file is a copy of the page.php file, the page content appears differently.

    In EITHER case, all the content is pushed up to the top of the page as if my header.php is not being called/rendered correctly.

    However, all my other pages look fine with the header being called/rendered and the page content pushed down correctly.

    And ALL files have the exact same header.php call on line 1.

    So again, I'm stumped...

  6. klynam
    Member
    Posted 3 years ago #

    Sorry - I didn't see your next post until I had posted my last comment.

    YOU my friend are a GENIUS!!! :-)

    Man those "little thing that mean a lot" always get me!

    Thanks VERY much for your help.

  7. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    you are welcome.

    sorry for not spotting the real cause immedeately and leading you on a tour through the template hierarchy ;-)

  8. klynam
    Member
    Posted 3 years ago #

    Hey that's great info and I really appreciate knowing more about what's going on behind the scenes.

Topic Closed

This topic has been closed to new replies.

About this Topic