{"id":14085,"date":"2011-07-19T05:41:29","date_gmt":"2011-07-19T05:41:29","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/tag-or-category-term-group-order\/"},"modified":"2016-04-01T15:16:20","modified_gmt":"2016-04-01T15:16:20","slug":"tag-or-category-term-group-order","status":"closed","type":"plugin","link":"https:\/\/en-au.wordpress.org\/plugins\/tag-or-category-term-group-order\/","author":164993,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.2.2","stable_tag":"trunk","tested":"4.5.33","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Tag or Category term_group order","header_author":"Logesh Kumar","header_description":"","assets_banners_color":"","last_updated":"2016-04-01 15:16:20","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/wp26.com\/","header_plugin_uri":"http:\/\/wp26.com\/wordpress-plugins","header_author_uri":"https:\/\/wp26.com\/about\/","rating":4.5,"author_block_rating":0,"active_installs":60,"downloads":5569,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.2.2":"<p>Tested up to WordPress 4.5<\/p>","0.1":"<p>This is the first version of this plugin.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":"1","5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"678464","resolution":"1","location":"assets"}},"screenshots":{"1":"'group' available when adding a new term."}},"plugin_section":[],"plugin_tags":[60018,60019,22233,31746,60014],"plugin_category":[],"plugin_contributors":[81091,87144],"plugin_business_model":[],"class_list":["post-14085","plugin","type-plugin","status-closed","hentry","plugin_tags-category-group","plugin_tags-category-grouping","plugin_tags-category-order","plugin_tags-sort-categories","plugin_tags-term_group","plugin_contributors-logeshmba","plugin_contributors-ravidreams","plugin_committers-ravidreams"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/tag-or-category-term-group-order.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/tag-or-category-term-group-order\/assets\/screenshot-1.png?rev=678464","caption":"'group' available when adding a new term."}],"raw_content":"<!--section=description-->\n<p>This plugin is intended as an aid to theme and plugin developers. It changes the term_group field value in a core WordPress database table<\/p>\n\n<p>($wpdb-&gt;terms). So, please be aware of the risks involved and always back up your site before activating a new plugin.<\/p>\n\n<p>The purpose of the plugin is to allow sorting of tags or categories based on 'term_group'. This allows queries that<\/p>\n\n<p>fetch terms to use 'term_group' as a sort order.<\/p>\n\n<p>This can be used to display tags or categories in a semantic way in archives and individual posts.<\/p>\n\n<p>For example,<\/p>\n\n<p>If we have three groups of categories for size, color and object, then categories displayed as<\/p>\n\n<p>Small, Green, Table<\/p>\n\n<p>Big, Blue, Chair<\/p>\n\n<p>are more readable than<\/p>\n\n<p>Table, small, green<\/p>\n\n<p>Chair, big, blue<\/p>\n\n<!--section=installation-->\n<ol>\n<li><p>Upload the category term_group order folder to \/wp-content\/plugins\/.<\/p><\/li>\n<li><p>Activate the plugin through the \"Plugins\" menu in WordPress.<\/p><\/li>\n<li><p>You will now be able to set a 'Group' field for categories.<\/p><\/li>\n<li><p>Paste the following code in single.php , index.php , archive.php to display the categories based on term_group order<\/p>\n\n<p>$args = array('orderby' =&gt; 'term_group', 'order' =&gt; 'ASC', 'fields' =&gt; 'all');<\/p>\n\n<p>$terms = wp_get_object_terms($post-&gt;ID, 'category', $args );<\/p>\n\n<p>$count = count($terms);<\/p>\n\n<p>if($count &gt; 0){<\/p>\n\n<p>echo 'Posted in<\/p>\n\n<ul>';\n\nforeach ($terms as $term) {\n\necho '<li><a>slug, 'category').'\"&gt;'.$term-&gt;name.'<\/a> .<\/li>';\n\n}\n\necho '<\/ul>\n\n<p>';<\/p>\n\n<p>}<\/p><\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>This is the first version of the plugin. So, no FAQ yet.<\/p>\n\n<!--section=changelog-->\n<h4>0.2.2<\/h4>\n\n<ul>\n<li>Tested up to WordPress 4.5 <\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Added style.css <\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>This is the first version of this plugin.<\/li>\n<\/ul>","raw_excerpt":"Adds a group field to tags and categories, allowing to sort them based on term_group order.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/14085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=14085"}],"author":[{"embeddable":true,"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ravidreams"}],"wp:attachment":[{"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=14085"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=14085"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=14085"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=14085"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=14085"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/en-au.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=14085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}