Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter brennan

    (@brennan)

    I didn’t move the DB, I imported posts. Would that be a better way to do it?

    Forum: Fixing WordPress
    In reply to: blog to the future
    brennan

    (@brennan)

    I came up with a few hacks that seem to have worked. On line 489 of classes.php I replaced the
    $where .= " AND post_date_gmt <= '$now'"; with:

    if ($cat_array[0]==X) {
    $where .= " AND post_date_gmt >= '$now'";
    } else {
    $where .= " AND post_date_gmt <= '$now'";
    }

    To allow viewing of future posts in category X (which you should change to the category_id that you’d like to view future posts of).

    Then, in template-functions-category.php on line 298 I replaced

    AND post_date_gmt < '$now' $exclusions

    with

    AND (post_date_gmt < '$now') OR cat_id = X $exclusions

    again, X is the category_id that you’d like to have viewed.

    The downsides I suppose are if you don’t have any upcoming events, you’ll still be able to click on category X, and get the no posts found error. Also, when the month changes over, if you only have in categories with category_id’s lower than category X, and you have future posts in category X, only the future posts will show up.

Viewing 2 replies - 1 through 2 (of 2 total)