{"id":4366704,"date":"2013-11-30T13:58:56","date_gmt":"2013-11-30T13:58:56","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/postphp-goes-blank\/"},"modified":"2016-08-21T13:04:20","modified_gmt":"2016-08-21T13:04:20","slug":"postphp-goes-blank","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/postphp-goes-blank\/","title":{"rendered":"Post.php goes blank"},"content":{"rendered":"<p>Howdy all. I just added a custom post type to my wordpress. Here&#8217;s the code (generated with GenerateWp.com)<\/p>\n<blockquote>\n<p>\n\/\/ Register Custom Post Type<br \/>\nfunction custom_post_type() {<\/p>\n<p>\t$labels = array(<br \/>\n\t\t&#8216;name&#8217;                =&gt; _x( &#8216;Logos&#8217;, &#8216;Post Type General Name&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;singular_name&#8217;       =&gt; _x( &#8216;Logo&#8217;, &#8216;Post Type Singular Name&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;menu_name&#8217;           =&gt; __( &#8216;Logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;parent_item_colon&#8217;   =&gt; __( &#8216;Parent Logo:&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;all_items&#8217;           =&gt; __( &#8216;All Logos&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;view_item&#8217;           =&gt; __( &#8216;View Logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;add_new_item&#8217;        =&gt; __( &#8216;Add New Logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;add_new&#8217;             =&gt; __( &#8216;New Logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;edit_item&#8217;           =&gt; __( &#8216;Edit Logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;update_item&#8217;         =&gt; __( &#8216;Update Logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;search_items&#8217;        =&gt; __( &#8216;Search Logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;not_found&#8217;           =&gt; __( &#8216;No logos found&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;not_found_in_trash&#8217;  =&gt; __( &#8216;No logos found in Trash&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t);<br \/>\n\t$args = array(<br \/>\n\t\t&#8216;label&#8217;               =&gt; __( &#8216;logo&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;description&#8217;         =&gt; __( &#8216;Product information pages&#8217;, &#8216;text_domain&#8217; ),<br \/>\n\t\t&#8216;labels&#8217;              =&gt; $labels,<br \/>\n\t\t&#8216;supports&#8217;            =&gt; array(&#8216;thumbnail&#8217;, &#8216;title&#8217;),<br \/>\n\t\t&#8216;taxonomies&#8217;          =&gt; array(),<br \/>\n\t\t&#8216;hierarchical&#8217;        =&gt; false,<br \/>\n\t\t&#8216;public&#8217;              =&gt; true,<br \/>\n\t\t&#8216;show_ui&#8217;             =&gt; true,<br \/>\n\t\t&#8216;show_in_menu&#8217;        =&gt; true,<br \/>\n\t\t&#8216;show_in_nav_menus&#8217;   =&gt; true,<br \/>\n\t\t&#8216;show_in_admin_bar&#8217;   =&gt; true,<br \/>\n\t\t&#8216;menu_position&#8217;       =&gt; 5,<br \/>\n\t\t&#8216;menu_icon&#8217;           =&gt; &#8221;,<br \/>\n\t\t&#8216;can_export&#8217;          =&gt; true,<br \/>\n\t\t&#8216;has_archive&#8217;         =&gt; true,<br \/>\n\t\t&#8216;exclude_from_search&#8217; =&gt; false,<br \/>\n\t\t&#8216;publicly_queryable&#8217;  =&gt; true,<br \/>\n\t\t&#8216;capability_type&#8217;     =&gt; &#8216;page&#8217;,<br \/>\n\t);<br \/>\n\tregister_post_type( &#8216;logo&#8217;, $args );<\/p>\n<p>}<\/p>\n<p>\/\/ Hook into the &#8216;init&#8217; action<br \/>\nadd_action( &#8216;init&#8217;, &#8216;custom_post_type&#8217;, 0 );\n<\/p>\n<\/blockquote>\n<p>My problem is, after I upload and add a featured image to the post, the image isn&#8217;t displayed in the <strong>Featured Image Area<\/strong>, only after I hit the refresh button.<\/p>\n<p>That&#8217;s not the biggest problem &#8211; but after this step If I use the <strong>Update<\/strong> button from the post &#8211; the page turns blank.<\/p>\n<p>A little help please.<\/p>\n","protected":false},"template":"","class_list":["post-4366704","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4366704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4366704\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4366704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}