Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Simple Primary Category readme

=== Simple Primary Category ===
Contributors: mrasharirfan
Tags: category,primary,taxonomy
Requires at least: 5.0
Tested up to: 5.4.1
Requires PHP: 7.0
Stable tag: 1.0.0
License: GPL3+
License URI: https://www.gnu.org/licenses/gpl-3.0.txt

A light-weight WordPress plugin to assign primary category to posts and custom post types.

== Installation ==
1. Download the plugin.
2. Login to your WordPress website dashboard.
3. Navigate to Dashboard > Plugins.
4. Click Add New and then Upload Plugin.
5. Browse to the file, select it, and click Install Now.
6. Click Activate Plugin once prompted.

== Screenshots ==
1. Gutenberg
2. Classic Editor

== Changelog ==
= Version 1.0.0
* Initial Release