{"id":116,"date":"2004-08-29T00:34:34","date_gmt":"2004-08-28T21:34:34","guid":{"rendered":"http:\/\/www.all-things-me.net\/blog\/archives\/2004\/08\/29\/subcategories-away"},"modified":"2010-08-12T02:15:03","modified_gmt":"2010-08-11T23:15:03","slug":"subcategories-away","status":"publish","type":"post","link":"https:\/\/www.all-things-me.net\/blog\/2004\/08\/29\/subcategories-away","title":{"rendered":"Subcategories away"},"content":{"rendered":"<p>I was trying to get rid of subcategories in a parent category (annoying when a post is NOT assigned to the parent category but still shows in it) with the help of <a href=\"http:\/\/www.andrew-hall-artist.com\/journal\/index.php?p=69\" class=\"external-link\">a post<\/a> by Andrew Hall. No luck. I studied the code and dared to comment out another bit that looked &#8220;right&#8221; and now it seems to work:<br \/>\nin wp-blog-header.php (found in the <abbr title=\"WordPress\">WP<\/abbr> root folder) around line 293 (under &#8220;Category stuff for nice URIs&#8221;), comment out (= add \/* before the code and *\/ after it) the line<\/p>\n<blockquote class=\"php\"><p>$whichcat .= get_category_children($cat, &quot; OR category_id = &quot;);<\/p><\/blockquote>\n<p>Also, updated wpPaginate plugin (by <a href=\"http:\/\/www.scriptygoddess.com\">Scriptygoddess<\/a>) to .1.1.<\/p>\n<p><strong>UPDATE<\/strong><br \/>\nOn WP1.5. this is found in wp-includes\/classes.php, on line 413. Comment out <\/p>\n<blockquote class=\"php\"><p>$whichcat .= get_category_children($q[&#8216;cat&#8217;], &#8221; OR category_id = &#8220;);<\/p><\/blockquote>\n<p><strong>UPDATE<\/strong><br \/>\nOn WP1.5.1.(1) these are found in wp-includes\/classes.php on lines 393, 396, 420; below Category Stuff and Category Stuff for Nice URIs. Comment out the lines starting with <code>$whichcat .= get_category_children<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to get rid of subcategories in a parent category (annoying when a post is NOT assigned to the parent category but still shows in it) with the help of a post by Andrew Hall. No luck. I studied the code and dared to comment out another bit that looked &#8220;right&#8221; and now [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,18],"tags":[],"class_list":["post-116","post","type-post","status-publish","format-standard","hentry","category-tweaks","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":1,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":1470,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/116\/revisions\/1470"}],"wp:attachment":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}