create category on theme setup


Is possible to create some default categories when a custom theme is activated?
I mean, when I activate a custom theme, I want that some predefined category are created, for example news or info, this because using this way I can load the post directly on the template parts of the theme. Otherwise, if I want to add a custom widget plugin, how I can achieve this? I see many website that are using widgets in footer or in other part of the pages, but I’ve never used them so I don’t know thhe correct way to add this feature on my page or post php files that have this structure:


if( have_posts() ): while( have_posts() ): the_post();





All the markup are added using shortcodes except for the title or somerimes for the post thumbnail.

, sialfa 12 months 0 Answers 84 views 0

Leave an answer