Skip to content

1426 hide post type when seo controls off - #23582

Merged
thijsoo merged 1 commit into
trunkfrom
1426-hide-post-type-when-seo-controls-off
Sep 4, 2026
Merged

1426 hide post type when seo controls off#23582
thijsoo merged 1 commit into
trunkfrom
1426-hide-post-type-when-seo-controls-off

Conversation

@pls78

@pls78 pls78 commented Sep 2, 2026

Copy link
Copy Markdown
Member

Context

  • N/A

Summary

This PR can be summarized in the following changelog entry:

  • Don't show a post type in the Bulk editor if Enable SEO controls and assessments is turned off for that post type.

Relevant technical choices:

  • N/A

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Prerequisites
  • Have a site with a few published posts and pages
  • Log in as an Administrator
  • Have at least one custom post type available, either:
    • by activating WooCommerce and having a couple of Products, or
    • by registering your own, e.g. a Books post type with 'public' => true
Test the fix on the default content types
  • Go to Yoast SEO -> Bulk editor
    • Make sure you see Posts and Pages among the content types
  • Go to Yoast SEO -> Settings -> Content types -> Posts
    • Scroll down to Additional settings
    • Turn Enable SEO controls and assessments off and save
  • Go back to Yoast SEO -> Bulk editor
    • Verify Posts is gone, and that Pages is still there and still works
  • Turn Enable SEO controls and assessments back on for Posts and save
    • Verify Posts is offered again in the bulk editor
  • Repeat the same steps for Pages
Test the fix on a custom post type
  • Go to Yoast SEO -> Bulk editor
    • Make sure your custom post type (e.g. Products) is offered as a content type
  • Go to Yoast SEO -> Settings -> Content types -> Products
    • In Additional settings, turn Enable SEO controls and assessments off and save
  • Go back to Yoast SEO -> Bulk editor
    • Verify Products is gone, while Posts and Pages are untouched
  • Turn the toggle back on for Products and save
    • Verify Products is offered again
Test the entry in the content overview
  • With Enable SEO controls and assessments off for Posts, go to Posts -> All Posts
    • Open the Bulk actions dropdown and verify the Yoast SEO group with Bulk edit is not there
  • Turn the toggle back on and reload Posts -> All Posts
    • Verify the Yoast SEO group with Bulk edit is back
  • Do the same check on your custom post type's overview (e.g. Products -> All Products)
Counter-checks
  • Turn Enable SEO controls and assessments off for all content types
    • Verify the bulk editor still loads and simply offers no content types, instead of erroring or showing a blank page
    • Check this with the browser console open: there should be no errors
  • Make sure the toggle keeps doing what it always did: with it off, the Yoast SEO metabox and sidebar are hidden when you edit a post of that type
  • Make sure a content type that still has the toggle on can be selected, edited and saved in the bulk editor exactly as before

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

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

Impact check

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

  • N/A

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 https://github.com/Yoast/reserved-tasks/issues/1426

@pls78 pls78 added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label Sep 2, 2026
@coveralls-official

Copy link
Copy Markdown

Coverage Report for CI Build 456618

Coverage at 53.341% (no base build to compare)

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 6 of 6 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 42877
Covered Lines: 22871
Line Coverage: 53.34%
Coverage Strength: 4.41 hits per line

💛 - Coveralls

@thijsoo thijsoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR + ACC 👍

@thijsoo thijsoo added this to the 28.6 milestone Sep 4, 2026
@thijsoo
thijsoo merged commit 5d68c94 into trunk Sep 4, 2026
40 checks passed
@thijsoo
thijsoo deleted the 1426-hide-post-type-when-seo-controls-off branch September 4, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants