I want to add the primary term option to my categories.
This is what I have: [My categories without primary][1] [1]: https://i.stack.imgur.com/yHiXl.png
This is what I want: [Categories with primary][2] [2]: https://i.stack.imgur.com/jl0YO.png
How do I add it by a function in the function.php?
I think what you are after is a feature of the Yoast SEO plugin:
More info here: https://yoast.com/help/how-to-select-a-primary-category/
Your screenshot is from an older version of the plugin: https://yoast.com/yoast-seo-3-1/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.