Giter Site home page Giter Site logo

primary-category's Introduction

Primary Category

Allows you to choose primary category for posts and custom post types.

Description

Notice: Currently works only with WordPress Gutenberg Editor, not Classic Editor compatible

  • Allows you to choose primary category for posts and custom post types.

  • When the permalink structure includes category and the category marked as Primary, will be used for generating the permalink of the post.

  • Works with posts and custom post types.

  • Allows you to filter posts by primary category in frontend. Example: Open a custom category page http://example.com/category-name/. You will see that, the posts will be filtered by the primary category only.

  • Whereas on category archive page, http://example.com/category/category-name/ You will see all the posts related to that category.

Installation

  1. Go to WordPress Plugin's Directory and Run the following commands to install plugin:
git clone [email protected]:kishanjasani/primary-category.git
cd primary-category
composer dumpautoload
npm i
  1. Now go to WordPress backend -> Plugin page -> Activate the Plugin.

  2. Now you should have ability to choose primary category in post category section.

A video walkthrough of the plugin : link.

Automated Testing

Setup Unit Test for the development:

  1. Go inside the Primary Category plugin directory
  2. Go to composer.json file and edit setup-local-tests script with your database configuration.
  3. Then tun composer run setup-local-tests
  4. Run composer run test

Best Practice

The plugin follows WordPress and WordPress VIP coding standards. You can check the standard configuration inside the phpcs.xml.dist file.

primary-category's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.