{"id":65014,"date":"2022-10-03T19:05:16","date_gmt":"2022-10-03T10:05:16","guid":{"rendered":"http:\/\/apricot-design.com\/wp2023\/?post_type=staffblog&#038;p=65014"},"modified":"2025-08-21T11:39:57","modified_gmt":"2025-08-21T02:39:57","slug":"wordpress_function","status":"publish","type":"staffblog","link":"https:\/\/apricot-design.com\/staffblog\/staffblog\/wordpress_function\/","title":{"rendered":"wordpress\u306e\u95a2\u6570\u8272\u3005"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u304b\u305a\u3067\u3059\u3002<\/p>\n<p>wordpress\u3092\u3082\u3046\u306f\u30846\u5e74\u307b\u3069\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c<br \/>\n\u672a\u3060\u306b\u77e5\u3089\u306a\u304b\u3063\u305f\u95a2\u6570\u3082\u591a\u304b\u3063\u305f\u308a\u3059\u308b\u306a\u30fc\u3068\u601d\u3063\u305f\u306e\u3067\u3061\u3087\u3063\u3068\u4fbf\u5229\u306a\u5099\u5fd8\u9332\u3067\u3059\u3002<\/p>\n<h3 class=\"add_line\"><span class=\"wrap\">\u6295\u7a3f\u30bf\u30a4\u30d7\u306e\u30e9\u30d9\u30eb\u30fb\u30b9\u30e9\u30c3\u30b0\u53d6\u5f97<\/span><\/h3>\n<p>\u666e\u6bb5\u6295\u7a3f\u30bf\u30a4\u30d7\u306e\u30e9\u30d9\u30eb\u3084\u30b9\u30e9\u30c3\u30b0\u3092\u53d6\u5f97\u3059\u308b\u969b\u306b\u306f<\/p>\n<div class=\"commentBox\">esc_html(get_post_type_object(get_post_type())->label)<br \/>\nesc_html(get_post_type_object(get_post_type())->name)<\/div>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u8a18\u8ff0\u3057\u3066\u305f\u3093\u3067\u3059\u304c\u3001\u6295\u7a3f\u304c\u306a\u3044\u3068\u30bf\u30a4\u30c8\u30eb\u3084\u30b9\u30e9\u30c3\u30b0\u304c\u53d6\u5f97\u51fa\u6765\u306a\u3044\u3093\u3067\u3059\u3088\u306d\u3002<br \/>\n\u306a\u3093\u3068\u304b\u51fa\u305b\u306a\u3044\u306e\u304b\u306a\u30fc\u3068\u6700\u8fd1\u8272\u3005\u898b\u3066\u3044\u307e\u3057\u305f\u3089\u3061\u3083\u3093\u3068\u53d6\u308c\u307e\u3057\u305f\uff01<\/p>\n<div class=\"commentBox\">esc_html(get_post_type_object(get_query_var(&#8216;post_type&#8217;))->label)<br \/>\nesc_html(get_post_type_object(get_query_var(&#8216;post_type&#8217;))->name)<\/div>\n<p>get_post_type() \u3092 get_query_var(&#8216;post_type&#8217;) \u306b\u3059\u308b\u3060\u3051\u3067<br \/>\n\u6295\u7a3f\u304c0\u4ef6\u3067\u3082\u3061\u3083\u3093\u3068\u30bf\u30a4\u30c8\u30eb\u30fb\u30b9\u30e9\u30c3\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\uff01<\/p>\n<h3 class=\"add_line\"><span class=\"wrap\">\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u53d6\u5f97<\/span><\/h3>\n<p>\u3053\u308c\u3044\u3064\u3082\u7d76\u5999\u306b\u56f0\u3063\u3066\u3044\u305f\u3093\u3067\u3059\u304c\u3001archive.php\u7b49\u3067<br \/>\n\u6295\u7a3f\u30bf\u30a4\u30d7\u306b\u7d10\u4ed8\u3044\u305f\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u306b\u3042\u305f\u3063\u3066<br \/>\n\u666e\u6bb5\u306f\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u30b9\u30e9\u30c3\u30b0\u3092\u624b\u5165\u529b\u3057\u3066\u3044\u307e\u3057\u305f\u3002<br \/>\n\u304c\uff01<br \/>\n\u6295\u7a3f\u304c\u305f\u304f\u3055\u3093\u3042\u3063\u3066\u3001\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u304c\u305f\u304f\u3055\u3093\u3042\u308b\u3063\u3066\u306a\u308b\u3068<br \/>\n\u3055\u3059\u304c\u306b\u624b\u5165\u529b\u306f\u9762\u5012\uff01\u3068\u3044\u3046\u3053\u3068\u3067\u8272\u3005\u63a2\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p>\u3042\u308b\u3082\u3093\u3067\u3059\u306d\u3002<\/p>\n<div class=\"commentBox\">$taxonomy_slugs = array_keys(get_taxonomies(array(&#8216;object_type&#8217; => array($posttype_slug))));<\/div>\n<p>\u30c0\u30f3\u30d7\u3057\u3066\u3082\u3089\u3046\u3068\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u306e\u60c5\u5831\u304c\u914d\u5217\u3067\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u306e\u3067\u3001foreach\u3067\u5fc5\u8981\u306a\u60c5\u5831\u53d6\u5f97\u3057\u3066\u3054\u306b\u3087\u3054\u306b\u3087\u30fb\u30fb\u30fb\u7684\u306a\u611f\u3058\u3067\u4f7f\u3048\u307e\u3059\uff01<br \/>\n\u3061\u3087\u3063\u3068\u9577\u304f\u306a\u308a\u305d\u3046\u306a\u306e\u3067\u3001foreach\u306e\u4e2d\u8eab\u306f\u307e\u305f\u305d\u306e\u3046\u3061\u7d39\u4ecb\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\uff01<\/p>\n<p>\u4fbf\u5229\u306awp\u95a2\u6570\u306f\u307e\u3060\u307e\u3060\u305f\u304f\u3055\u3093\u3042\u308a\u305d\u3046\u306a\u306e\u3067\u3001\u52c9\u5f37\u3057\u307e\u3059\uff01\uff01<\/p>\n<p>\u305d\u308c\u3067\u306f\u3002<\/p>\n","protected":false},"featured_media":78190,"parent":0,"menu_order":0,"template":"","blog_cat":[25],"blog_tag":[],"blog_recommendation_ct":[],"writing-ct":[29],"class_list":["post-65014","staffblog","type-staffblog","status-publish","has-post-thumbnail","hentry","blog_cat-web","writing-ct-hirabayashi-kazuaki"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/staffblog\/65014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/staffblog"}],"about":[{"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/types\/staffblog"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/media\/78190"}],"wp:attachment":[{"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/media?parent=65014"}],"wp:term":[{"taxonomy":"blog_cat","embeddable":true,"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/blog_cat?post=65014"},{"taxonomy":"blog_tag","embeddable":true,"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/blog_tag?post=65014"},{"taxonomy":"blog_recommendation_ct","embeddable":true,"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/blog_recommendation_ct?post=65014"},{"taxonomy":"writing-ct","embeddable":true,"href":"https:\/\/apricot-design.com\/staffblog\/wp-json\/wp\/v2\/writing-ct?post=65014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}