{"id":200900,"date":"2015-02-06T11:30:01","date_gmt":"2015-02-06T02:30:01","guid":{"rendered":""},"modified":"2016-07-30T21:01:28","modified_gmt":"2016-07-30T21:01:28","slug":"%e3%82%bf%e3%82%af%e3%82%bd%e3%83%8e%e3%83%9f%e3%83%bc%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f%e4%b8%80%e8%a6%a7%e3%81%a7pdf%e3%81%8c%e3%81%82%e3%82%8b%e5%a0%b4%e5%90%88%e3%81%a0%e3%81%91pdf","status":"closed","type":"topic","link":"https:\/\/ja.wordpress.org\/support\/topic\/%e3%82%bf%e3%82%af%e3%82%bd%e3%83%8e%e3%83%9f%e3%83%bc%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f%e4%b8%80%e8%a6%a7%e3%81%a7pdf%e3%81%8c%e3%81%82%e3%82%8b%e5%a0%b4%e5%90%88%e3%81%a0%e3%81%91pdf\/","title":{"rendered":"\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u3092\u4f7f\u7528\u3057\u305f\u4e00\u89a7\u3067PDF\u304c\u3042\u308b\u5834\u5408\u3060\u3051PDF\u306b\u76f4\u30ea\u30f3\u30af\u3055\u305b\u305f\u3044"},"content":{"rendered":"<p>\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u3092\u4f7f\u7528\u3057\u305f\u4e00\u89a7\u3067<br \/>\n\u3000\u3000PDF\u304c\u3042\u308b\u5834\u5408\u3060\u3051PDF\u306b\u76f4\u30ea\u30f3\u30af\u3059\u308b\u3002<br \/>\n\u3000\u3000PDF\u304c\u306a\u3044\u5834\u5408\u306f\u8a73\u7d30\u30da\u30fc\u30b8\u306b\u30ea\u30f3\u30af\u3059\u308b\u3002<br \/>\n\u3068\u3044\u3046\u6761\u4ef6\u5206\u5c90\u3092\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u3046\u307e\u304f\u3067\u304d\u307e\u305b\u3093\u3002\u3002\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3057\u3066\u3082\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u3092\u5229\u7528\u3057\u305f\u30eb\u30fc\u30d7\u5185\u306b\u3042\u308b\u305b\u3044\u304b\u5206\u5c90\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n<code>&lt;?php if(post_custom(&#039;\u30d5\u30a3\u30fc\u30eb\u30c9\u540d&#039;)): ?&gt;<\/code><\/p>\n<p>if(post_custom())\u306e\u307e\u307e\u3067\u3059\u304c\u3001\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002<br \/>\n\u3054\u6559\u793a\u9802\u3051\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<pre><code>&lt;?php\n$args = array(\n&#039;parent&#039;       =&gt; 0,\n&#039;hierarchical&#039; =&gt; 0,\n&#039;order&#039;        =&gt; &#039;ASC&#039;\n);\n    $taxonomy_name = &#039;\u30bf\u30af\u30bd\u30ce\u30df\u540d&#039;;\n    $taxonomys = get_terms($taxonomy_name,$args);\n    if(!is_wp_error($taxonomys) &amp;&amp; count($taxonomys)):\n        foreach($taxonomys as $taxonomy):\n        $url = get_term_link($taxonomy-&gt;slug, $taxonomy_name);\n        $tax_posts = get_posts(array(\n            &#039;post_type&#039; =&gt; get_post_type(),\n            &#039;posts_per_page&#039; =&gt; -1,\n            &#039;tax_query&#039; =&gt; array(\n                array(\n                    &#039;taxonomy&#039;=&gt;&#039;\u30bf\u30af\u30bd\u30ce\u30df\u540d&#039;,\n                    &#039;terms&#039;=&gt;array( $taxonomy-&gt;slug ),\n                    &#039;field&#039;=&gt;&#039;slug&#039;,\n                    &#039;include_children&#039;=&gt;true,\n                    &#039;operator&#039;=&gt;&#039;IN&#039;\n                    ),\n                &#039;relation&#039; =&gt; &#039;AND&#039;\n                )\n            ));\n    if($tax_posts):\n?&gt;&lt;dl&gt;\n&lt;dt id=&quot;&lt;?php echo esc_html($taxonomy-&gt;slug); ?&gt;&quot; class=&quot;line&quot;&gt;&lt;?php echo esc_html($taxonomy-&gt;name); ?&gt;&lt;\/dt&gt;\n&lt;dd&gt;\n&lt;ul&gt;\n    &lt;?php foreach($tax_posts as $tax_post): ?&gt;\n&lt;?php if(post_custom(&#039;PDF\u30d5\u30a3\u30fc\u30eb\u30c9\u540d&#039;)): ?&gt;\/\/PDF\u304c\u3042\u308b\u5834\u5408\n&lt;?php\n$cft_pdf = get_post_meta($tax_post-&gt;ID, &#039;PDF\u30d5\u30a3\u30fc\u30eb\u30c9\u540d&#039;, true);\n$cft_pdf = wp_get_attachment_url($cft_pdf, &#039;full&#039;);\/\/pdf\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3092\u53d6\u5f97\n?&gt;\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $cft_pdf; ?&gt;&quot;&gt;&lt;?php echo get_the_title($tax_post-&gt;ID); ?&gt;&lt;\/a&gt;&lt;\/li&gt;\n&lt;?php else : ?&gt;\/\/PDF\u304c\u306a\u3044\u5834\u5408\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt;?php echo get_the_title($tax_post-&gt;ID); ?&gt;&lt;\/a&gt;&lt;\/li&gt;\n&lt;?php endif; ?&gt;\n    &lt;?php endforeach; ?&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-200900","topic","type-topic","status-closed","hentry","topic-tag-14327","topic-tag-15782","topic-tag-get_post_meta"],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/200900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/200900\/revisions"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=200900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}