In GenesisWP Facebook group a user asked:
I am looking for a way to limit the category shown in the post meta to 1 (the default category assigned to the post).
I have many posts in 2 categories to maximize content distribution throughout the site. I would love for an option to choose which category displays in the post meta.
We can use create a custom field group having a Primary Category selector dropdown using Advanced Custom Fields' Taxonomy field type and if populated for a post, display the selected category link in the post meta rather than all the categories to which the post belongs.
Example: Let's say a post belongs to "Category #3" and "Dairy Free"
we can specify "Dairy Free" as the primary category
and have it appear on the front end.
instead of the standard
Here's how this can be set up.
Step 1
Install and activate Advanced Custom Fields.
Create a Primary Category Settings
field group like this:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Hello Sridhar! This is helpful. Do you know how we could customize this to use the Yoast Primary Category instead?
Here you go Shay.
https://sridharkatakam.com/display-yoast-seos-primary-category-genesis-entry-meta/
[…] the comments section of Custom Shortcode for Primary Category Link in Genesis Entry Meta using ACF tutorial, a user […]