WordPress / Learn

WordPress.org Learn - The canonical source for the code and content behind https://learn.WordPress.org
257 stars 88 forks source link

Don't include Learning Pathway archive sections when empty #2655

Closed adamwoodnz closed 1 month ago

adamwoodnz commented 1 month ago

Currently we use a Query Loop bock for Courses matching the Learning Pathway and Level, with a no results message if empty.

Instead we should not include a section if there are no results. We'd likely need a custom block to achieve this, and it could be reused for each section, taking Learning Pathway and Level as attributes.

adamwoodnz commented 1 month ago

Turns out we might have a block already built for this https://github.com/WordPress/wporg-mu-plugins/pull/599

adamwoodnz commented 1 month ago

We're going to implement a different short term fix for this, see #2766