{"id":48482,"date":"2016-05-17T18:43:59","date_gmt":"2016-05-17T18:43:59","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/primary-categories\/"},"modified":"2018-08-05T16:48:22","modified_gmt":"2018-08-05T16:48:22","slug":"primary-categories","status":"publish","type":"plugin","link":"https:\/\/test.wordpress.org\/plugins\/primary-categories\/","author":14225058,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"trunk","tested":"4.9.29","requires":"3.4","requires_php":"","requires_plugins":"","header_name":"Primary Categories","header_author":"Jacob McKinney","header_description":"","assets_banners_color":"75bd76","last_updated":"2018-08-05 16:48:22","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/jacobmckinney.com\/primary-categories","header_author_uri":"http:\/\/jacobmckinney.com\/","rating":4.5,"author_block_rating":0,"active_installs":20,"downloads":5338,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":"1","5":"1"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1419117","resolution":"128x128","location":"assets","width":126,"height":126}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1419117","resolution":"772x250","location":"assets","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1419027","resolution":"1","location":"assets","width":1265,"height":663},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1419027","resolution":"2","location":"assets","width":1265,"height":663},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1419027","resolution":"3","location":"assets","width":1265,"height":663}},"screenshots":{"1":"Example of post edit screen with primary category meta box.","2":"Example of shortcode being used in page.","3":"Example output of shortcode."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[610,357],"plugin_category":[43,57],"plugin_contributors":[95090],"plugin_business_model":[],"class_list":["post-48482","plugin","type-plugin","status-publish","hentry","plugin_tags-categories","plugin_tags-shortcodes","plugin_category-customization","plugin_category-taxonomy","plugin_contributors-jacobmc","plugin_committers-jacobmc"],"banners":{"banner":"https:\/\/ps.w.org\/primary-categories\/assets\/banner-772x250.png?rev=1419117","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/primary-categories\/assets\/icon-128x128.png?rev=1419117","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/primary-categories\/assets\/screenshot-1.png?rev=1419027","caption":"Example of post edit screen with primary category meta box."},{"src":"https:\/\/ps.w.org\/primary-categories\/assets\/screenshot-2.png?rev=1419027","caption":"Example of shortcode being used in page."},{"src":"https:\/\/ps.w.org\/primary-categories\/assets\/screenshot-3.png?rev=1419027","caption":"Example output of shortcode."}],"raw_content":"<!--section=description-->\n<p>WordPress plugin for setting and displaying primary categories for posts and custom post types*.<\/p>\n\n<p>This plugin creates a meta box on the post edit screen titled \"Primary Category\" containing a drop down menu populated with all categories associated with that post**. Selecting a primary category and updating the post saves this data into a custom field with a meta key of \"primary-category\".<\/p>\n\n<p>To display a list of all posts with a particular primary category, use the shortcode [primary-category name=\"cat_name\"] where cat_name is the name of the primary category you wish to display. If a name is not specified, the shortcode will default to all posts with \"uncategorized\" set as the primary category.<\/p>\n\n<p>*Note: Custom post types must support both categories and custom fields.<\/p>\n\n<p>**Note: As new categories are added to a post, the post must be updated before those new categories will be available for selection as a primary category.<\/p>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<ol>\n<li>Upload the 'primary-categories' directory to your '\/wp-content\/plugins\/' directory, or install the plugin through the WordPress plugins screen directly<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Select the primary category for each post via the post edit screen<\/li>\n<li>Place shortcode to the content of any post type or access the data via the post meta key 'primary-category'<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How can I access the primary category data?<\/dt>\n<dd><p>A post's primary category is stored in the post meta under the key 'primary-category'.<\/p><\/dd>\n<dt>What shortcode can I use to display posts with a particular primary category?<\/dt>\n<dd><p>[primary-category name=\"\"]<\/p>\n\n<p>*Note: Name should reference the primary category that is to be displayed, if no name is specified, the name parameter defaults to 'uncategorized'.<\/p><\/dd>\n<dt>Why isn't the category I added available as a primary category?<\/dt>\n<dd><p>Users must update a post after adding a new category before that category will be available as a primary category.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<p>Initial Commit<\/p>","raw_excerpt":"WordPress plugin for setting and displaying primary categories for posts and custom post types.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/48482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=48482"}],"author":[{"embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jacobmc"}],"wp:attachment":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=48482"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=48482"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=48482"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=48482"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=48482"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=48482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}