book-review-library
book-review-library copied to clipboard
Parent Categories?
Hi! Why is there a parent category option for authors and illustrators, but not for genres and subjects? Can I add that functionality?
Thanks! Michelle
Really the reason was/is cosmetic. There's no specific reason why it's that way, really.
All that needs to be changed is flipping hierarchical
from false
to true
here:
https://github.com/jazzsequence/book-review-library/blob/master/class-book-reviews.php#L456
and here: https://github.com/jazzsequence/book-review-library/blob/master/class-book-reviews.php#L646
If you want to submit a pull request I'd be happy to merge it in and work on updating a minor release for the .org repo.
Got it! Thank you!
How would I go about returning just the child subjects of a designated parent subject? In theory, I'm not expecting you to write code for me. Thanks!
That’s actually a rather complex question. This should get you close: http://www.wpbeginner.com/wp-tutorials/display-subcategories-on-category-pages-in-wordpress/
The difference is that you’re not working with categories but a custom taxonomy. So you’d be using taxonomy_exists and get_taxonomy and related functions rather than the category-specific functions.