Support » Plugin: Grid Archives » [Plugin: Grid Archives] Category parameter

  • Resolved niajahi


    I’m not able to get this to display the correct category, (on local machine). When I save the page with a particular category tag, each archived page displays the same one even though have different category tags.
    [grid_archives category=”Category 1″]
    [grid_archives category=”Category 2″]
    [grid_archives category=”Category 3″]

    Whichever is saved last, all will show that category.

    Any help?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Just found out that it’s to do with the non-expire cached copy of the filtered posts array in grid-archives.php around line 76. If I comment that bit out, it works fine.

    Is it safe to do this?

    Ok, a fix.

    Line 76 in grid-archives.php

    if($posts = get_transient(GRID_ARCHIVES_POSTS_TRANSIENT_KEY)) {

    should be

    if($posts == get_transient(GRID_ARCHIVES_POSTS_TRANSIENT_KEY)) {

    …a double equal sign instead of a single.


    Plugin Author samsonw


    Hi niajahi,

    Thanks for the help. I’ve checked the code, but the original code was correct, it should be only 1 equal sign:)

    As you said, the reason is because grid-archives will do a cache for your current posts, but it will only cache 24 hours if no new posts are created. Once you create a new post, the cache will be invalided.

    You can also manually expire/invalid the cache by clicking the “Save Changes” button without changing any configuration. (I will add a refresh button in the future release.)

    Hi Samsonw, I tried putting that back to a single equal sign, and refreshed the cache, but no luck. Adding a new post to a category will change all the views for every page to that updated one.

    Commenting out that caching section seems to be the only option for me at the moment.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Grid Archives] Category parameter’ is closed to new replies.