INN / umbrella-sfpublicpress

San Francisco Public Press
https://sfpublicpress.org/
GNU General Public License v2.0
1 stars 4 forks source link

pre_get_posts filter to remove cats_home categories from homepage #105

Closed benlk closed 4 years ago

benlk commented 4 years ago

For https://github.com/INN/umbrella-sfpublicpress/issues/104

Changes

This pull request makes the following changes:

Why

For #104

Testing/Questions

Features that this PR affects:

Questions that need to be answered before merging:

Steps to test this PR:

  1. Find the term ID of the "From the Newsroom" category. If you've got a DB dump more recent than Monday, it's 3952. In Dashboard > Appearance > Theme Options > Layout > Other Homepage Display Options, put that ID in the "Categories to include or exclude" box, and save the theme options
  2. tail your debug log. This is the mechanism by which you can check whether this is running on non-homepage requests.
  3. Visit the homepage:
    • there should be a lot of log noise.
  4. Visit the admin:
    • there should be no log noise
  5. Visit term archives, author pages, category archives:
    • there should be no log noise

Once this has been verified to work on a computer other than mine, I'll remove the error_log generating all the noise, and deploy this to staging.

joshdarby commented 4 years ago

@benlk I don't see it running on anywhere other than the homepage.

Places I've checked: