Skip to content

robbie-cahill/primary-category-for-wordpress-posts

Repository files navigation

Primary Category for Posts

This plugin will add a magic meta box to your edit post page that will allow you to set a Primary Category for your posts. This is done via a searchable dropdown that uses AJAX in the background to get results.

This plugin would be useful for a media site where you need to list all posts based on their primary category alone inside your theme.

Getting Started

Clone this repo, drop the folder into your WordPress plugins folder, then run npm install to grab the JavaScript dependencies

Requirements

  • WordPress 4.9 and up
  • PHP 7.2 and up. This is required for the void and scalar return types the functions in this project use
  • The latest versions of NodeJS and NPM

Coding Standards

This plugin uses the WordPress and WordPress VIP coding standards. It should be suitable for deployment on the WordPress VIP platform.

License

GPLV3 or later

Credits

This plugin uses the awesome select2 (https://select2.org/) library to render the searchable category dropdown

Releases

No releases published

Packages

No packages published