{"id":2945,"date":"2018-04-18T18:47:31","date_gmt":"2018-04-18T09:47:31","guid":{"rendered":"http:\/\/taitan916.info\/blog\/?p=2945"},"modified":"2024-02-20T17:22:49","modified_gmt":"2024-02-20T08:22:49","slug":"post-2945","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/2945","title":{"rendered":"Advanced Custom Fields\u3067\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u8a18\u4e8b\u3092\u53d6\u5f97"},"content":{"rendered":"<p>Advanced Custom Fields\u3067\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u3042\u308a\u3001\u30c1\u30a7\u30c3\u30af\u3055\u308c\u3066\u3044\u308b\u5024\u3054\u3068\u306b\u8a18\u4e8b\u3092\u53d6\u5f97\u3057\u305f\u304b\u3063\u305f\u3002<a href=\"http:\/\/taitan916.info\/blog\/?p=2899\" target=\"_blank\" rel=\"noopener\">\u4ee5\u524d\u5bfe\u5fdc\u3057\u305f\u3088\u3046\u306a\u5f62<\/a>\u3067\u3044\u3051\u308b\u304b\u3068\u601d\u3044\u304d\u3084\u305d\u3046\u3067\u3082\u306a\u304b\u3063\u305f\u306e\u3067\u5bfe\u5fdc\u65b9\u6cd5\u3092\u30e1\u30e2\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u8a2d\u5b9a\u5185\u5bb9<\/h2>\n<p>\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u8eab\u306f\u4ee5\u4e0b\u3092\u60f3\u5b9a\u3057\u3001\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\u306f\u300c\u30c6\u30b9\u30c8\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u300d\u3068\u3059\u308b\u3002<\/p>\n<ul>\n<li>1 : \u8d64<\/li>\n<li>2 : \u9752<\/li>\n<li>3 : \u7dd1<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>MySQL\u306e\u4fdd\u5b58\u5185\u5bb9<\/h2>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u3055\u308c\u305f\u5f62\u3067\u4fdd\u5b58\u3055\u308c\u3066\u3044\u305f\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">a:2:{i:0;s:1:\"2\";i:1;s:1:\"3\";}<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u53d6\u5f97\u65b9\u6cd5<\/h2>\n<p>\u524d\u63d0\u3068\u3057\u3066\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u5024\u306fGET\u30af\u30a8\u30ea\u306b\u3066test=\u5024\u306e\u5f62\u3067\u6307\u5b9a\u3059\u308b\u3082\u306e\u3068\u3059\u308b\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5f62\u3067\u53d6\u5f97\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php\r\n$paged = (int) get_query_var('paged');\r\n$args = array(\r\n    'posts_per_page' =&gt; 10,\r\n    'paged' =&gt; $paged,\r\n    'orderby' =&gt; 'post_date',\r\n    'order' =&gt; 'DESC',\r\n    'post_type' =&gt; 'post',\r\n    'post_status' =&gt; 'publish', \r\n    'post__not_in' =&gt; array( get_the_ID() ), \r\n);\r\n\r\nif( $_GET['genre'] ){\r\n    $args['meta_query'] = array(\r\n        array(\r\n            'compare'=&gt;'LIKE', \/\/LIKE\u691c\u7d22\u6307\u5b9a\r\n            'key' =&gt; '\u30c6\u30b9\u30c8\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9', \r\n            'value' =&gt; '1:\"' . $_GET['test'] . '\"'\r\n        ),\r\n    );\r\n}\r\n$the_query = new WP_Query($args);\r\n?&gt;<\/pre>\n<p>LIKE\u691c\u7d22\u3067\u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u3055\u308c\u3066\u3044\u308b\u5185\u5bb9\u304b\u3089\u7121\u7406\u3084\u308a\u62bd\u51fa\u3059\u308b\u5f62\u306b\u306a\u308b\u3002\u4eca\u56de\u306f\u5024\u3092\u6570\u5024\u3067\u5165\u308c\u3066\u3044\u305f\u306e\u3067\u52a9\u304b\u3063\u305f\u304c\u3001\u6587\u5b57\u5217\u306e\u5834\u5408\u306f\u691c\u7d22\u304c\u3067\u304d\u306a\u3044\u5834\u5408\u3082\u51fa\u3066\u304d\u305d\u3046\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Advanced Custom Fields\u3067\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u8a18\u4e8b\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u306fLIKE\u691c\u7d22\u3067\u62bd\u51fa\u3059\u308b\u3002\u5024\u90e8\u5206\u306f\u6587\u5b57\u5217\u3067\u8a2d\u5b9a\u3057\u3066\u304a\u3044\u305f\u65b9\u304c\u826f\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Advanced Custom Fields\u3067\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u30ab\u30b9\u30bf ... <\/p>\n","protected":false},"author":1,"featured_media":1093,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[24,41],"tags":[97],"class_list":["post-2945","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","category-cms","tag-advanced-custom-fields"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=2945"}],"version-history":[{"count":1,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2945\/revisions"}],"predecessor-version":[{"id":4512,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/2945\/revisions\/4512"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/1093"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=2945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=2945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=2945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}