WordPress / wporg-showcase-2022

The official theme of the WordPress.org showcase.
https://wordpress.org/showcase/
19 stars 4 forks source link

Featured category disappears when saving a post #272

Open marko-srb opened 1 month ago

marko-srb commented 1 month ago

To replicate the issue:

  1. Select any site that is featured on the home page under the second section.
  2. Go and edit any text in it.
  3. Publish/Save.
  4. Return to live site.*

*Once you return to live site, you'll see that site/post isn't featured anymore. To fix it, you'll need to manually visit this site post and open to edit it — then check 'featured' filter/category, even though you didn't uncheck it.

Can we solve this by disabling automatic 'unchecking' of a 'featured' filter if someone changes text or any edit (that isn't the mentioned check/uncheck)?

Thanks!

ryelle commented 1 month ago

The issue is likely that this function is affecting the backend too:

https://github.com/WordPress/wporg-showcase-2022/blob/6694d2df0b9ce9fb4c5b1f2e3894a902deb56ba1/source/wp-content/themes/wporg-showcase-2022/functions.php#L637-L645