WordPress.org

Forums

[resolved] Archives Glitch (10 posts)

  1. Trent Adams
    Member
    Posted 7 years ago #

    I have done some searching around and can't seem to find anything, so I decided to give it a shot here! I have moved my blog around a few times using the export/import functions and maybe that is why I am seeing this problem now.

    The problem lies with the strange glitch in my archives. It It shows the list of months with posts in brackets, but at the end of the lists of months, it shows the strangest thing:

    0 (1)

    I typically would display my archives in my sidebar, but that glitch just is just ugly, so I use the dropdown box instead. That being said, I would like to find a way to fix it ;)

    Just for fixing purposes, I created an archive page. Take a look if you will under the 'by Month' at the bottom to see the linked "0". It does change the link each month to the newest one. Last month Sept, this month Oct, next will be Nov, etc....

    http://trentadams.com/archives/

    Any help would be greatly appreciated!

    Cheers,

    Trent

  2. Jeremy Clark
    Moderator
    Posted 7 years ago #

    Most likely your sidebar code looks like this
    <?php wp_get_archives('type=monthly&show_post_count=1'); ?>

    Remove the show_post_count=1

    Reference
    http://codex.wordpress.org/Template_Tags/wp_get_archives

  3. Trent Adams
    Member
    Posted 7 years ago #

    I am not worried about the post count though, but the linked "0" to the current month. If I remove the post count, it still will just show the "0" versus the "0 (1)".

    Trent

  4. Jeremy Clark
    Moderator
    Posted 7 years ago #

    What is the exact code your trying to use to display your archives?

  5. Trent Adams
    Member
    Posted 7 years ago #

    Thanks jeremyclark13 for the help. In this example, I am using the default sidebar widget and for the archive page created above (http://trentadams.com/archives/) I am using the page template 'Archives'.

    If I change the widget to not show the post counts for the sidebar widget, it just shows the "0" below all the months. I am kind of at a loss since I am not sure where to look ;)

    Trent

  6. Trent Adams
    Member
    Posted 7 years ago #

    I guess what I am saying is it might not be the 'code' to display the archives (happens with all archive widgets) and rather a corrupt database entry with all the importing and exporting.....

    Trent

  7. Trent Adams
    Member
    Posted 7 years ago #

    Does anyone know what query would be used to call the archives so I can figure out where to start looking in the database?

    Trent

  8. moshu
    Member
    Posted 7 years ago #

  9. Trent Adams
    Member
    Posted 7 years ago #

    moshu, that is genious! I bet that is the problem and would be explained with missing information during an import or export! I will do some searching and show as resolved if that is the case ;)

    Really appreciated!

    Trent

  10. Trent Adams
    Member
    Posted 7 years ago #

    That was it. There was one item that didn't have a timestamp and showed nothing but 0's across the board!

    Cheers everyone for the help!

    Trent

Topic Closed

This topic has been closed to new replies.

About this Topic