{"id":123,"date":"2004-09-04T23:24:45","date_gmt":"2004-09-04T20:24:45","guid":{"rendered":"http:\/\/www.all-things-me.net\/blog\/archives\/2004\/09\/04\/static"},"modified":"2010-08-12T02:14:07","modified_gmt":"2010-08-11T23:14:07","slug":"static","status":"publish","type":"post","link":"https:\/\/www.all-things-me.net\/blog\/2004\/09\/04\/static","title":{"rendered":"Static"},"content":{"rendered":"<p>Inspired by <a href=\"http:\/\/www.neiluchitel.com\/index.php?p=137\" class=\"external-link\">the idea<\/a> presented at Digitus, Finger &amp; Co. I installed MooKitty&#8217;s <a href=\"http:\/\/mookitty.co.uk\/devblog\/category\/show-categories\/\">Show Categories plugin<\/a> and modified it with the code in <a href=\"http:\/\/mookitty.co.uk\/devblog\/archives\/2004\/06\/18\/show-categories-14\/#comment-330\">a comment by Paul<\/a>.<\/p>\n<p>&#8220;Static pages&#8221; are posts but hidden from the index page, archives, and category listing. They can be found by search, however. I &#8220;staticised&#8221; my booklog and the page about me already but I still have some more work to do. I decided to keep commenting on for the static pages. I removed &#8220;lots&#8221; of things, though. It&#8217;s easy: Just add<\/p>\n<blockquote class=\"php\"><p>\n&lt;?php if ($cat != <strong>x<\/strong>) { ?&gt; <strong>HIDDEN STUFF HERE<\/strong> &lt;?php } ?&gt;\n<\/p><\/blockquote>\n<p>around the bits you want to hide (<strong>x<\/strong> being the ID number of the category you are hiding). That bit of code means &#8220;if the category number does NOT equal x, show the bit between { and }&#8221;.<br \/>\nI hid the date, time posted, and word count.<\/p>\n<p>The breadcrumb code is located outside the WP loop so at first I didn&#8217;t know how to get the category info for if-clauses (for hiding the breadcrumb from static pages). I found a function in_category(x) where x is the number of the category. It returns true or false. So, I put a<\/p>\n<blockquote class=\"php\"><p>\n&lt;?php if ( !in_category(<strong>x<\/strong>) ) { ?&gt; <strong>HIDDEN STUFF HERE<\/strong> &lt;?php } ?&gt;\n<\/p><\/blockquote>\n<p>around the breadcrumb code and now it&#8217;s gone from the static pages just as I like it.<\/p>\n<p>Making static (or more like non-entry) pages this way makes it easier for them to keep up with the modifications I make to the index page. I used to have the static pages as php pages where I had copied the &#8220;header&#8221; and &#8220;footer&#8221; of each page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Inspired by the idea presented at Digitus, Finger &amp; Co. I installed MooKitty&#8217;s Show Categories plugin and modified it with the code in a comment by Paul. &#8220;Static pages&#8221; are posts but hidden from the index page, archives, and category listing. They can be found by search, however. I &#8220;staticised&#8221; my booklog and the page [&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-123","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\/123","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=123"}],"version-history":[{"count":1,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":1469,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/123\/revisions\/1469"}],"wp:attachment":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}