-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to force posts to use category image #1
Comments
Perhaps could have post randomly select a category on each page load. Or it could have extra meta box appear on single post page which lets the user select which category the image should come from (perhaps not that user friendly). Or it could just pick the first category's image (how the current extension plugin works I think). It would also be nice to extend this to work with other taxonomies automatically too. |
Current plan:
Known major problems with current plan:
Known minor problems with current plan (both of which I think are unfixable):
|
Because of the problems listed above, it may be best to continue implementing this as an extension plugin, but better built, uploaded to the official repository and linked to within the core plugins plugin page. |
I've implemented some of this as version 1.4 of the single posts plugin ... https://geek.hellyer.kiwi/plugins/unique-headers-single-posts/ Since it's an extra plugin, I didn't think the extra checkbox was necessary (due to not needing to worry about backwards compatbility) and so activating will automatically make the single posts pick up a header image if available. To avoid serious load problems, I limited it to checking for 10 terms per taxonomy. After the tenth attempt, it simply gives up. It will look through all available taxonomies and post-types automatically, not just posts/categories. The performance is acceptable. If 10 terms are set per taxonomy, but no header image is set, and them are dozens of custom taxonomies set, then the performance of the site could lag a bit, but it won't crash the site. For sites where the header images are always set, the performance won't be effected in any m meaningful way. For sites where the header images are never set on taxonomies, but no custom taxonomies are present, the performance will be a bit shit, but the average user probably won't notice it. I haven't as yet figured out a way to work around these performance problems. It seems to be an inherent problem with accessing this type of data :/ |
Provide a checkbox alongside the category image selector, to force posts to use the category image.
First mentioned here:
https://wordpress.org/support/topic/header-for-all-posts-within-a-category?replies=2#post-6593403
Code to do most of it, is here (requires editing of code comments, as some of them are wrong):
https://geek.hellyer.kiwi/plugins/unique-headers-single-posts/
The text was updated successfully, but these errors were encountered: