Skip to content
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

Parent Categories? #54

Open
michelliebel opened this issue Sep 22, 2017 · 4 comments
Open

Parent Categories? #54

michelliebel opened this issue Sep 22, 2017 · 4 comments

Comments

@michelliebel
Copy link

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

@jazzsequence
Copy link
Owner

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.

@michelliebel
Copy link
Author

Got it! Thank you!

@michelliebel
Copy link
Author

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!

@michelliebel michelliebel reopened this Mar 17, 2018
@jazzsequence
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants