https://github.com/asharirfan/simple-primary-category
đ˛ A light-weight WordPress plugin to assign & query posts and custom post types based on their primary taxonomy.
https://github.com/asharirfan/simple-primary-category
Last synced: 2 months ago
JSON representation
đ˛ A light-weight WordPress plugin to assign & query posts and custom post types based on their primary taxonomy.
- Host: GitHub
- URL: https://github.com/asharirfan/simple-primary-category
- Owner: asharirfan
- License: gpl-3.0
- Created: 2019-03-20T15:30:35.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T20:13:28.000Z (over 1 year ago)
- Last Synced: 2025-03-28T08:41:34.307Z (3 months ago)
- Language: PHP
- Homepage: https://wordpress.org/plugins/simple-primary-category/
- Size: 575 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
đ˛ Simple Primary Category
A light-weight WordPress plugin to assign & query posts and custom post types based on their primary taxonomy.
## đž 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.## â How to Use
1. Browse to any post or custom post type in WordPress admin.
2. Check the taxonomies that you want to assign to it.
3. Select the respective primary taxonomies.
4. Save the post.
5. Use this shortcode to query the posts: `spc_primary_term_posts`.
6. Use the action hook â `spc_display_primary_term_posts` â to display the queried posts in your theme.### đ Accepted Shortcode Arguments
| Argument | Description | Default |
| ---------------- | ------------------------------------ | --------- |
| `term` | Term ID or name. | â |
| `taxonomy` | (Optional) Taxonomy name. | `null` |
| `post_type` | (Optional) Custom Post Type. | `post` |
| `post_status` | (Optional) Post status. | `publish` |
| `posts_per_page` | (Optional) Number of posts per page. | `10` |## đĨī¸ Screenshots
**Gutenberg**
**Classic Editor**
## ÂŠī¸ License & Attribution
GPL2+ Š [Ashar Irfan](https://asharirfan.com).