php – Create a new category with code

Question

I`m try to make a plugin.
When someone install the plugin I want the plugin to automatic make a category for posts in my WP site.
A category called «Recommend».

This category should only be showing in admin area.

If I set this category at a post, a widget should show this post with featured image, title and date.

How can I automatic create a post category with php when i install the plugin ?

0
bjovaar 5 months 2022-03-15T18:34:27-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse