Gives you the ability to set a primary category on your posts.
Simple clone or download this repo and put it on your Wordpress /plugins
folder, then you can activate on WP-ADMIN
.
Set a primary category on your post:
Just write the following shortcode on your post:
- By ID -
[pcm category-id='{id}']
- By Slug Name -
[pcm category-name='{slug}']
If you wish to use it on your theme:
<?php echo do_shortcode("[pcm category-id='{id}']"); ?>
If you wish to implement your own template to render the post list, just include the following file on your theme folder:
pcm_primary_category/post-list.php
Also the plugin provide a new field on the WP-API called pcm_primary_category
for every post that you set the primary category.
pcm_before_list
- Implement code before the post list appearspcm_before_item
- Implement code before the item on the list appearspcm_before_link
- Implement code before the post link appearspcm_after_link
- Implement code after the post link appearspcm_after_item
- Implement code after the item on the list appearspcm_after_list
- Implement code after the post list appears
- Apply More PHP Unit Tests
- Right now we're just testing one function of the plugin to proove the concept of Unit Tests and WP_MOCK.
- The goal of this improvement is to apply tests for all functions of the plugin.
- Apply JS Unit Tests - QUnit
- Rodrigo Venancio - http://rodrigovenancio.info/