Forums

Problems with archives (3 posts)

  1. gudlyf
    Member
    Posted 7 years ago #

    I'm not quite sure what's going on, but I had to resort to commenting out the following lines from "wp-blog-header.php" because no matter what I sent to "index.php" the "$year" variable would not be considered blank:
    if ('' != $year) {
    $year = '' . intval($year);
    $where .= " AND YEAR(post_date)='$year'";
    }
    If I went to this URL:
    http://www.gudlyf.com/index.php?m=200304
    The query would read that I was looking for year "2003", but then later (in the lines I uncommented) decide that $year wasn't blank, and overrule the previous definition. Another strange thing...go to http://www.gudlyf.com/archives/2003/06/ and you'll see the correct posts, but look at the title -- it says "2004". What the...?
    Also, going to the main page alwaysb shows "Gudlyf's World >> 2004". I'd rather it show no year for the main page.
    Any help appreciated.

  2. gudlyf
    Member
    Posted 7 years ago #

    Update: Can someone help me out in tracking down where the $year variable is set? I'm utterly confused as to why it's being set when I'm not passing it to index.php. Thanks.

  3. gudlyf
    Member
    Posted 7 years ago #

    UGH. I figured it out. Unique to my setup. I had a "vars.php" file in my site root already that was setting $year. Duh.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.