Skip to content

feat(schema): add PodcastEpisode option to page and article type dropdowns - #23500

Open
faisalahammad wants to merge 4 commits into
Yoast:trunkfrom
faisalahammad:fix/23491-add-podcast-episode-schema-option
Open

feat(schema): add PodcastEpisode option to page and article type dropdowns#23500
faisalahammad wants to merge 4 commits into
Yoast:trunkfrom
faisalahammad:fix/23491-add-podcast-episode-schema-option

Conversation

@faisalahammad

@faisalahammad faisalahammad commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Context

Podcast sites that publish episodes as blog posts have no way to mark those posts as podcast episodes in the schema settings. The request in #23491 is to add "Podcast Episode" as an option in the schema dropdowns, so search engines and other consumers of structured data can understand that a post is a podcast episode.

Summary

This PR can be summarized in the following changelog entry:

  • Adds a Podcast Episode option to the schema page type and article type dropdowns.

Relevant technical choices:

  • PodcastEpisode is added to both the PAGE_TYPES and ARTICLE_TYPES constants and to the matching label arrays in Schema_Types, so the option shows up in the metabox Schema tab and in the per-post-type defaults in the settings. All other consumers read from these constants, so no further wiring is needed.
  • When selected as the article type, the existing wrapping logic in Meta_Tags_Context outputs "@type": [ "Article", "PodcastEpisode" ] in the Article piece. This multi-type notation is valid schema.org, and it is the same behaviour as other types that do not contain "Article" in their name, like Report.
  • No JavaScript changes are needed, because the dropdown options are sent from the server.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Edit any post, open the Yoast SEO sidebar or metabox and go to the Schema tab. Verify that "Podcast Episode" is listed in both the Page type and the Article type dropdowns.
  • Select "Podcast Episode" as the Article type, save the post and view the front end. Verify that the Article piece in the JSON-LD contains "@type": [ "Article", "PodcastEpisode" ].
  • Go to Yoast SEO > Settings > Content types and verify that "Podcast Episode" is also available as a default Article type for each post type.
  • Edit an existing post that already has another article type selected and verify that the saved value and the schema output are unchanged.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

The dropdowns are rendered from the same server-side options on every post type, so it is worth checking a regular post plus one custom post type that supports the schema settings.

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

  • Same as the acceptance test steps above.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • The schema page type and article type dropdowns in the post editor and in the settings.
  • The schema output of posts that select the new Podcast Episode article type. Posts that keep their current selection are not affected.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.
  • I have run grunt build:images and committed the results, if my PR introduces or edits images or SVGs.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #23491

Screen recording

Video

faisalahammad added a commit to faisalahammad/wordpress-seo that referenced this pull request Jul 26, 2026
Coveralls upload failed with a 503 (service unavailable) and the code
style job hit a git exit code 128 during runner cleanup. All tests and
coding standards checks passed in the original run. This empty commit
re-runs the checks.

Refs Yoast#23500
@faisalahammad

Copy link
Copy Markdown
Contributor Author

CI failure diagnosis

All 4 failing checks were infrastructure flakes, not code defects:

Check Root cause Status
Unit Test: PHP 8.3 Coveralls upload got HTTP 503 (service overloaded). The PHPUnit tests themselves passed: OK (5809 tests, 30406 assertions). Code is fine
Check code style PHPCS threshold comparison passed. Exit code 128 came from a git error during runner cleanup, not from PHPCS. Code is fine
Finish coveralls build Downstream of the PHP 8.3 Coveralls 503 failure. Code is fine
Validate PR Labels & Milestone The changelog: enhancement label is missing. Label needed

I pushed an empty commit to re-trigger CI. The 3 infrastructure failures should pass on re-run.

Request: Could a maintainer add the changelog: enhancement label to this PR? The milestone is for the merger to set (per CONTRIBUTING.md).

Thanks!

faisalahammad added a commit to faisalahammad/wordpress-seo that referenced this pull request Jul 26, 2026
The PHPDoc return-type improvements in schema-types.php fixed two
coding standards issues on the branch, reducing the full-codebase
error count below the 2386 threshold. The ratchet mechanism (exit
code 128) requires the threshold to be updated to match the improved
count.

Refs Yoast#23500
@github-actions

Copy link
Copy Markdown

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

…downs

- Adds 'PodcastEpisode' to Schema_Types::PAGE_TYPES and ARTICLE_TYPES.
- Adds 'Podcast Episode' labels to get_page_type_options() and get_article_type_options().
- Tightens PHPDoc return type annotations for both option methods.
- Adds unit tests covering the new option in both arrays.

Fixes Yoast#23491
Coveralls upload failed with a 503 (service unavailable) and the code
style job hit a git exit code 128 during runner cleanup. All tests and
coding standards checks passed in the original run. This empty commit
re-runs the checks.

Refs Yoast#23500
The PHPDoc return-type improvements in schema-types.php fixed two
coding standards issues on the branch, reducing the full-codebase
error count below the 2386 threshold. The ratchet mechanism (exit
code 128) requires the threshold to be updated to match the improved
count.

Refs Yoast#23500
@faisalahammad
faisalahammad force-pushed the fix/23491-add-podcast-episode-schema-option branch from 0df3ca8 to fad3a97 Compare July 29, 2026 12:50
The post-rebase code style run reports 2376 errors against the
previous 2384 threshold. The threshold is a tight ceiling — CI
fails when the actual error count drifts from the committed
value, so the threshold must move in lockstep with each stage
of trunk. This commit brings the threshold in line with the
current full-repo error count.
@github-actions

Copy link
Copy Markdown

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Podcast Episode Schema Option for Article Type

2 participants