{"id":58,"date":"2007-05-13T13:35:52","date_gmt":"2007-05-13T12:35:52","guid":{"rendered":"http:\/\/muttznutz.net\/muttzblog\/site-news\/link-organisation-with-the-categoryoverload-plugin\/2007\/05\/13"},"modified":"2008-10-18T09:53:20","modified_gmt":"2008-10-18T08:53:20","slug":"link-organisation-with-the-categoryoverload-plugin","status":"publish","type":"post","link":"https:\/\/muttznutz.net\/muttzblog\/site-news\/link-organisation-with-the-categoryoverload-plugin","title":{"rendered":"Link organisation with the Category Overload plugin"},"content":{"rendered":"<p>I&#8217;m also looking after my Club&#8217;s site, and have loaded <a href=\"http:\/\/alexking.org\/projects\/wordpress\">Alex King&#8217;s CategoryOverload<\/a> plugin.<br \/>\nThis is cool, as it lets you build a hierarchy of link categories.<\/p>\n<p>I&#8217;ve written a custom SQL routine &#8211; which I&#8217;ve included in one of our pages &#8211; to use this for output, by cycling through the different sub-categories of a parent (other links aren&#8217;t output).<br \/>\nThis works with WordPress 2.1.3.<br \/>\nFeel free to adapt it.<\/p>\n<p>Here&#8217;s the skeleton code, for a &#8220;parent&#8221; category with an ID of 12.<br \/>\nNote that Php commands have an extra space inserted after the &#8220;< \" to prevent accidental execution.\n\nThis first bit builds a array of sub-categories :-\n[code lang=\"php\"]\n<?php\n$querystr = \"\nSELECT cat_id, cat_name\nFROM `wp_categories`\nWHERE category_parent =12\norder by cat_id\n\";\n$linkcats = $wpdb->get_results($querystr, OBJECT); ?> [\/code]<\/p>\n<p>&#8230; Then this part loops through each subcategory and outputs it.<br \/>\n(you may want to put some formatting in &#8230;)<\/p>\n<p>[code lang=&#8221;php&#8221;]<br \/>\n< ?php if ($linkcats): ?><br \/>\n< ?php foreach ($linkcats as $linkcat): ?><br \/>\n< ?php echo $linkcat->cat_name ; ?><br \/>\n< ?php get_links( $linkcat->cat_id, &#8221;, &#8221;, &#8221;, TRUE, &#8216;category&#8217;, TRUE, FALSE, -1, FALSE, TRUE); ?><br \/>\n< ?php endforeach; ?><br \/>\n< ?php endif; ?><br \/>\n[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m also looking after my Club&#8217;s site, and have loaded Alex King&#8217;s CategoryOverload plugin. This is cool, as it lets you build a hierarchy of link categories. I&#8217;ve written a custom SQL routine &#8211; which I&#8217;ve included in one of our pages &#8211; to use this for output, by cycling through the different sub-categories of [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[3],"tags":[81,136,80],"_links":{"self":[{"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/posts\/58"}],"collection":[{"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":1,"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":244,"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/posts\/58\/revisions\/244"}],"wp:attachment":[{"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muttznutz.net\/muttzblog\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}