Skip to content

fix(academy): show posts of any date on the Content Board - #1114

Merged
Genyus merged 1 commit into
developfrom
fix/content-board-all-dates
Nov 12, 2026
Merged

Genyus merged 1 commit into
developfrom
fix/content-board-all-dates

Conversation

@Genyus

@Genyus Genyus commented Nov 11, 2026

Copy link
Copy Markdown
Member

Problem

The PublishPress Content Board only lists posts whose publish date falls inside its date range. That range defaults to five weeks either side of today, and it applies even when no date filter is set (posts_where_range() in publishpress-planner/modules/content-board/content-board.php).

The board tracks workflow status, but a session's publish date is when its post was created. As a result:

  • Older sessions in a workflow status never appear. Lesson 5173 was dated May 2025 and didn't show in Pending Review, although the Sessions dashboard listed it. Its date has since been changed by hand.
  • The sessions imported on 21 October 2026 will drop off the default board around 25 November, whatever their status.

Fix

A new mu-plugin, cbf-content-board-all-dates.php, removes the date condition from the board's query:

  • It tags the board's query with the active date range through PP_Content_Board_posts_query_args, which receives the range as its fourth argument.
  • A posts_where filter at priority 11, after PublishPress's own, removes the exact condition PublishPress built from that range.

Only queries tagged by the board are touched. If PublishPress changes how it writes the condition, nothing matches and the board keeps filtering by date as it does now.

The plugin builds the dates with gmdate() where PublishPress uses date(). They give the same result because WordPress sets PHP's default timezone to UTC.

The board's date filter controls stay in place but no longer narrow the list.

Testing

I ran the board's query on production with the live PP_Content_Board instance and its posts_where_range(). I set the date range in memory to 5 November to 31 December 2026, so nothing was saved to user meta:

  • Without the plugin: 0 pending lessons, and the SQL includes the post_date condition.
  • With the plugin: all 8 pending lessons, and the SQL has no post_date condition.
  • An unrelated WP_Query is unchanged.

phpcs passes.

@Genyus
Genyus merged commit bfadb33 into develop Nov 12, 2026
4 checks passed
@Genyus
Genyus deleted the fix/content-board-all-dates branch November 12, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant