✔ DOSP Click - I added category of Deacons, added documents, but the main DOSP Click page did not reflect changes
Completed by Ryan R.
- Assigned to
-
Ryan R.
- Notes
-
Are there more steps to it?
https://dosp2.diocesanweb.com/dosp-click/
https://dosp2.diocesanweb.com/dosp-click/deacons/
That said, I checked the Priests page, and all of a sudden I see no files. Something changed, somewhere...
My guess is that they may have gone through and removed the Priests audience from those files. Hm.
The reason Deacons (and School Admins) aren't showing on DOSP Click is due to my query hiding empty Audiences. We know Deacons isn't actually empty, but there's the issue... the term count that Wordpress uses thinks it's empty since it appears to be only counting Quick Links (despite registering the correct generic count callback). Which is why Priests shows, because it satisfies the "not empty" clause since it has a Quick Link assigned to it.
The odd thing is that EML shows accurate counts on the Media page. Why does it need to recalculate or alter the established calculation!?!? For the record the counts work as expected when EML is disabled.
I see my potential options as:
1) Remove the "hide empty" rule, and just show all Audience buttons, ready or not. Worst case I can do this and call it a day.
2) Fix the function/filter conflict either by registration, priority, or whatever makes both parts happy.
3) Create and register my own count function that counts the universal way that it does when EML is not present. I don't know if this is even an option, but I want to see if it is.
I'll keep you posted
Long story short, I simply copied the _update_generic_term_count function, gave it a new name (dosp_update_generic_term_count), and assigned it to my taxonomies for "update_count_callback".
We are probably missing something in EML to allow taxonomies to use the generic count function, but rather than dig to the bottom of it I went this route for simplicity.
I also updated the Priest page shortcode to use the updated slug.
DOSP Click is back in business.