How To Use Custom Taxonomies with Pods & GeneratePress

This article will quickly show you how to use WordPress Custom Taxonomies and Conditional Tags To Show Content In or With Specific Items and Areas (similarly to 'widget visibility' by Jetpack).

THIS POST IS NOT COMPLETE. SUBSCRIBE TO GET THE FINISHED POST NEXT WEEK!

Things you will need:
Pods
GeneratePress

Things you may want (to extend this concept):
Elementor
PopUp Maker
WPFront Notification Bar

Skill Level:
Intermediate

The Code You Need:


Introduction:

So for this tutorial I assume you are wondering how to use custom taxonomies to show specific content on individual posts (or pages) or assign a custom taxonomy to something like a pop up plugin.  Below you will find details on these topics and methods to make it all happen.


Creating Custom Taxonomies with Pods

Step 1: Download and install Pods 🙂 get it here.

Step 2: Create a new custom taxonomy.  In this example create “Navigation Layer(s)” as the taxonomy.

Step 3: Create a child taxonomy named “Welcome Header”.


Using GeneratePress’s Hooks

Step 1: Download and install GeneratePress 🙂 get it here.

Step 2: Go to “After Header” hook and insert this code:

*Note: The use of custom taxonomies and theme hooks will work with other themes which have available front-end areas to hook into.


Creating A New Post & Assigning The Taxonomy

Step 1: Create new page (or post/custom-post-type).

Step 2: Select the new custom taxonomy created.  Select “Welcome Header”.

Step 3: Update the page and see the content displayed in GeneratePress’s “After Header” hook area.


Ideas Using Conditional Content

Pop Ups

Banners/Notification Bars

Category Titles


Short Codes & Hooks

Elementor

WooCommerce


Hooks vs Widget Visibility

Pros of Hooks:

Cons of Hooks:

Pros of Widget Visibility:

Cons of Widget Visibility:


Conclusion


Additional Resources:

%d bloggers like this: