• Resolved andymc5202

    (@andymc5202)


    I have a large blog of some 13,000 entries. I have just done a batch addition of 137 entries for 1974… but they don’t seem to show up in the expanding archive for 1974. Similarly some entries for months in other years don’t seem to expand. I’m sure it is a problem with the way in which I have entered these – but at the moment everything else seems to work perfectly. Can you give me any clues as to which fields in the database are used to create the index… then I can check whether they have been set correctly. (I would have thought – Published Date, and Title, and possibly URL)

    https://www.ads-software.com/plugins/expanding-archives/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ashley

    (@nosegraze)

    Hi ??

    The most important thing is the post_date column. I use this query to pull out the distinct months/years:

    SELECT DISTINCT MONTH( post_date ) AS month , YEAR( post_date ) AS year, COUNT( id ) as post_count FROM $wpdb->posts WHERE post_status = 'publish' and post_date <= now( ) and post_type = 'post' GROUP BY month , year ORDER BY post_date DESC

    Then I cycle through those results to display posts published in that given month/year.

    However, the result from that above query is saved in a transient ( expanding_archives_months ) to prevent loading on every single page. If you just imported a bunch of posts, then you might still be seeing the old cached results.

    You can delete that transient with this code:

    delete_transient( 'expanding_archives_months' );

    Or you can delete it directly in the database with SQL.

    However, if the date is showing up but not expanding, that’s a separate issue. When a date is clicked, that triggers an ajax request to load the posts in that given date/year. This problem could be much wider – even just a JavaScript error. It might help me see the problem if you post a site URL.

    Thread Starter andymc5202

    (@andymc5202)

    Thanks for the quick response.

    As you suggested I have deleted the transient from wp_options. Using phpmyadmin I deleted the row for _transient_expanding_archives_months. I then refreshed the blog page and the missing entries showed up. The cache was, indeed, the reason for my original issue.

    The issue with non-expansion of some entries seems to have evaporated.

    Plugin Author Ashley

    (@nosegraze)

    That’s wonderful! I’m glad we got it solved. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Gaps in the archive’ is closed to new replies.