{"id":309,"date":"2013-09-25T13:41:58","date_gmt":"2013-09-25T11:41:58","guid":{"rendered":"http:\/\/hesmid.nl\/test\/?p=309"},"modified":"2013-09-25T22:52:48","modified_gmt":"2013-09-25T20:52:48","slug":"custom-post-types","status":"publish","type":"post","link":"https:\/\/hesmid.nl\/test\/custom-post-types\/","title":{"rendered":"Custom Post Types"},"content":{"rendered":"<p>Apart form the many examples on the internet and elsewhere (for example in <a href=\"http:\/\/stephanieleary.com\/books\/wordpress-for-web-developers\/\">WordPress for Web Developers<\/a>) here are some notes:<\/p>\n<p>&#8211; When custom posts don&#8217;t show up after creating them, it may help to set the permalinks to default and back again to your preffered setting.<\/p>\n<p>&#8211; To change where the custom post type appears in the admin sidebar, set menu-position to one of the following:<\/p>\n<p><!--more--><\/p>\n<ul>\n<li>\u00a05 &#8211; below Posts<\/li>\n<li>10 &#8211; below Media<\/li>\n<li>15 &#8211; below Links<\/li>\n<li>20 &#8211; below Pages<\/li>\n<li>25 &#8211; below comments<\/li>\n<li>60 &#8211; below first separator<\/li>\n<li>65 &#8211; below Plugins<\/li>\n<li>70 &#8211; below Users<\/li>\n<li>75 &#8211; below Tools<\/li>\n<li>80 &#8211; below Settings<\/li>\n<li>100 &#8211; below second separator<\/li>\n<\/ul>\n<p>&#8211; You can set a menu icon with menu-icon<\/p>\n<p>&#8211;\u00a0Note that public is true by default for taxonomies but is false by default for post types. The query_vars,\u00a0rewrite, and show_ui attributes all inherit from public, so be sure to set public to true (or turn on each of those\u00a0items individually).<\/p>\n<h3>Including Custom Post Types in Your Theme<\/h3>\n<p>As long as the has_archive argument was set to true when the post type was registered, displaying your custom post types in your theme is easy. To create a single archive page for a custom post type, all you have to do is create another file in your theme directory, single-type.php. To create an archive list page for the post type, create a file called archive-type.php.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apart form the many examples on the internet and elsewhere (for example in WordPress for Web Developers) here are some notes: &#8211; When custom posts don&#8217;t show up after creating them, it may help to set the permalinks to default and back again to your preffered setting. &#8211; To change where the custom post type [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17],"tags":[35],"acf":[],"_links":{"self":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/309"}],"collection":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":4,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":313,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/309\/revisions\/313"}],"wp:attachment":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}