Archived topic
Using Custom Taxonomies and GP Hooks
6 replies · Started by Dan on December 13, 2016
I am wanting/trying to figure out how GP and Pods work together. I have custom taxonomies created using Pods. I have the taxonomies associated with posts, pages, custom post types etc. When I create a new Page Post Type and assign it a custom taxonomy I can then have specific widgets show on the specific page, using 'widget visibility'.
So I'm wondering how we can do this same sort of logical visibility using the GP hooks.
So if a user is on a page with a custom taxonomy assigned (like popup-1) the (for example: Above Header) hook area would display the pre-created hook (for Above Header).
Does this make sense?
Also does this php sense for what I am trying to accomplish?
<?php if ( is_tax( 'pop-1' ) ) : ?>
<?php endif; ?>
Thank you so much, GP is awesome, just been a day or two with it and its great!
Any help or direction is appreciated!
That should definitely work. You can find all of the available WordPress conditionals here: https://codex.wordpress.org/Conditional_Tags
Let me know if you need more info :)
<?php if ( has_term( 'pop-1', 'navigation_page' ) ) : ?>
<?php endif; ?>
I definitely have spent my time on the codex! I didn't know what I didn't know :) Got it working now, its been about 2 days with Generate Press and I think you have the perfect psychology behind it's architecture. I have tried just about all the popular premium and free themes, and always had to create new custom page/post templates with php, hacking the code etc. What you have here is awesome, keep it lightweight like it is (I know I 'preaching to the choir'). Thanks again for the work you've done!
Also, what would you say is the big differences between GP and Genesis? I am very Interested on the topic
Glad you're enjoying it!
Honestly I haven't touched Genesis in about 5 years, I think GP uses the Customizer more (although maybe Genesis does now?).
I think both are great themes - it's just all about preference :)
I saw a few other's posted on this already, my apologies for the re-question. I think the psychology and use of the customizer and integration with major plugins out of the box is my preferred method :). The hooks are great, and with the custom taxonomies it all really has me sold all the way going forward. Before GP I was using StoreFront for latest projects and starting from scratch with their (heavy-styled) css and then having to create custom post templates for the layouts I needed. I think what you have here out of the box is great. All positivity :)
That's great to hear! Thank you! :)