{"id":1,"date":"2025-09-04T16:07:30","date_gmt":"2025-09-04T16:07:30","guid":{"rendered":"http:\/\/sovannsen.com\/?p=1"},"modified":"2025-10-27T11:53:35","modified_gmt":"2025-10-27T11:53:35","slug":"hello-world","status":"publish","type":"post","link":"https:\/\/sovannsen.com\/index.php\/2025\/09\/04\/hello-world\/","title":{"rendered":""},"content":{"rendered":"<p>\/**<br \/>\n * Register a custom post type called &#8220;Portfolio&#8221;.<br \/>\n *\/<br \/>\nfunction create_portfolio_post_type() {<br \/>\n    $labels = array(<br \/>\n        &#8216;name&#8217;                  => _x( &#8216;Portfolio&#8217;, &#8216;Post type general name&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;singular_name&#8217;         => _x( &#8216;Portfolio Item&#8217;, &#8216;Post type singular name&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;menu_name&#8217;             => _x( &#8216;Portfolio&#8217;, &#8216;Admin Menu text&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;name_admin_bar&#8217;        => _x( &#8216;Portfolio Item&#8217;, &#8216;Add New on Toolbar&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;add_new&#8217;               => __( &#8216;Add New&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;add_new_item&#8217;          => __( &#8216;Add New Portfolio Item&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;new_item&#8217;              => __( &#8216;New Portfolio Item&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;edit_item&#8217;             => __( &#8216;Edit Portfolio Item&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;view_item&#8217;             => __( &#8216;View Portfolio Item&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;all_items&#8217;             => __( &#8216;All Portfolio Items&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;search_items&#8217;          => __( &#8216;Search Portfolio Items&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;parent_item_colon&#8217;     => __( &#8216;Parent Portfolio Items:&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;not_found&#8217;             => __( &#8216;No portfolio items found.&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;not_found_in_trash&#8217;    => __( &#8216;No portfolio items found in Trash.&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;featured_image&#8217;        => _x( &#8216;Portfolio Item Cover Image&#8217;, &#8216;Overrides the \u201cFeatured Image\u201d phrase for this post type. Added in 4.3&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;set_featured_image&#8217;    => _x( &#8216;Set cover image&#8217;, &#8216;Overrides the \u201cSet featured image\u201d phrase for this post type. Added in 4.3&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;remove_featured_image&#8217; => _x( &#8216;Remove cover image&#8217;, &#8216;Overrides the \u201cRemove featured image\u201d phrase for this post type. Added in 4.3&#8217;, &#8216;textdomain&#8217; ),<br \/>\n        &#8216;use_featured_image&#8217;    => _x( &#8216;Use as cover image&#8217;, &#8216;Overrides the \u201cUse as featured image\u201d phrase for this post type. Added in 4.3&#8217;, &#8216;textdomain&#8217; ),<br \/>\n    );<\/p>\n<p>    $args = array(<br \/>\n        &#8216;labels&#8217;             => $labels,<br \/>\n        &#8216;public&#8217;             => true,<br \/>\n        &#8216;publicly_queryable&#8217; => true,<br \/>\n        &#8216;show_ui&#8217;            => true,<br \/>\n        &#8216;show_in_menu&#8217;       => true,<br \/>\n        &#8216;query_var&#8217;          => true,<br \/>\n        &#8216;rewrite&#8217;            => array( &#8216;slug&#8217; => &#8216;portfolio&#8217; ), \/\/ This is your portfolio URL slug<br \/>\n        &#8216;capability_type&#8217;    => &#8216;post&#8217;,<br \/>\n        &#8216;has_archive&#8217;        => true,<br \/>\n        &#8216;hierarchical&#8217;       => false,<br \/>\n        &#8216;menu_position&#8217;      => 5, \/\/ 5 = below Posts<br \/>\n        &#8216;supports&#8217;           => array( &#8216;title&#8217;, &#8216;editor&#8217;, &#8216;thumbnail&#8217;, &#8216;excerpt&#8217; ),<br \/>\n        &#8216;menu_icon&#8217;          => &#8216;dashicons-format-gallery&#8217;, \/\/ Find more icons here: https:\/\/developer.wordpress.org\/resource\/dashicons\/<br \/>\n    );<\/p>\n<p>    register_post_type( &#8216;portfolio&#8217;, $args );<br \/>\n}<br \/>\nadd_action( &#8216;init&#8217;, &#8216;create_portfolio_post_type&#8217; );<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/** * Register a custom post type called &#8220;Portfolio&#8221;. *\/ function create_portfolio_post_type() { $labels = array( &#8216;name&#8217; => _x( &#8216;Portfolio&#8217;, &#8216;Post type general name&#8217;, &#8216;textdomain&#8217; ), &#8216;singular_name&#8217; => _x( &#8216;Portfolio Item&#8217;, &#8216;Post type singular name&#8217;, &#8216;textdomain&#8217; ), &#8216;menu_name&#8217; => _x( &#8216;Portfolio&#8217;, &#8216;Admin Menu text&#8217;, &#8216;textdomain&#8217; ), &#8216;name_admin_bar&#8217; => _x( &#8216;Portfolio Item&#8217;, &#8216;Add New on Toolbar&#8217;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/posts\/1","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/comments?post=1"}],"version-history":[{"count":1,"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/posts\/1\/revisions"}],"predecessor-version":[{"id":16,"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/posts\/1\/revisions\/16"}],"wp:attachment":[{"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/media?parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/categories?post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sovannsen.com\/index.php\/wp-json\/wp\/v2\/tags?post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}