{"id":5299,"date":"2020-03-01T23:33:21","date_gmt":"2020-03-01T14:33:21","guid":{"rendered":"http:\/\/a-priori.org\/wordpress\/?page_id=5299"},"modified":"2020-03-01T23:33:21","modified_gmt":"2020-03-01T14:33:21","slug":"test-2","status":"publish","type":"page","link":"https:\/\/a-priori.org\/wordpress\/test-2","title":{"rendered":"test"},"content":{"rendered":"<p><?php\n\/\/ \u30ab\u30b9\u30bf\u30e0\u5206\u985e\u540d\n$taxonomy = 'lyrics';\n\n\/\/ \u30d1\u30e9\u30e1\u30fc\u30bf\n$args = array(\n    \/\/ \u89aa\u30bf\u30fc\u30e0\u306e\u307f\u53d6\u5f97\n    'parent' => 0,<br \/>\n   'orderby' => 'slug',<br \/>\n     'order' => 'ASC',<br \/>\n    \/\/ \u5b50\u30bf\u30fc\u30e0\u306e\u6295\u7a3f\u6570\u3092\u89aa\u30bf\u30fc\u30e0\u306b\u542b\u3081\u308b<br \/>\n    'pad_counts' => true,<\/p>\n<p>    \/\/ \u6295\u7a3f\u8a18\u4e8b\u304c\u306a\u3044\u30bf\u30fc\u30e0\u3082\u53d6\u5f97<br \/>\n    'hide_empty' => false<br \/>\n);<\/p>\n<p>\/\/ \u30ab\u30b9\u30bf\u30e0\u5206\u985e\u306e\u30bf\u30fc\u30e0\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97<br \/>\n$terms = get_terms( $taxonomy , $args );<\/p>\n<p>if ( count( $terms ) != 0 ) {<br \/>\n    echo '<\/p>\n<div>';<\/p>\n<p>    \/\/ \u89aa\u30bf\u30fc\u30e0\u306e\u30ea\u30b9\u30c8 $terms \u3092 $term \u306b\u683c\u7d0d\u3057\u3066\u30eb\u30fc\u30d7<br \/>\n    foreach ( $terms as $term ) {<\/p>\n<p>        \/\/ \u89aa\u30bf\u30fc\u30e0\u306eURL\u3092\u53d6\u5f97<br \/>\n        $term = sanitize_term( $term, $taxonomy );<br \/>\n        $term_link = get_term_link( $term, $taxonomy );<br \/>\n        if ( is_wp_error( $term_link ) ) {<br \/>\n            continue;<br \/>\n        }<\/p>\n<p>        \/\/ \u89aa\u30bf\u30fc\u30e0\u306eURL\u3068\u540d\u79f0\u3068\u30ab\u30a6\u30f3\u30c8\u3092\u51fa\u529b<br \/>\n        echo '<\/p>\n<h3><a href=\"' . esc_url( $term_link ) . '\">' . $term->name . '<\/a><span style=\"font-size: small;\"> (' . $term->count . ')<\/span><\/h3>\n<p>';<\/p>\n<p>      \/\/ \u5b50\u30bf\u30fc\u30e0\u306eID\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97<br \/>\n        $termid = $term->term_id;<br \/>\n        $term_children = get_terms( $taxonomy, array('child_of'=>$termid,'orderby'=>'slug','order'=>'ASC') );<br \/>\n        if( count( $term_children ) != 0 ) {<br \/>\n            echo '<\/p>\n<ul>';<br \/>\n            \/\/ \u5b50\u30bf\u30fc\u30e0\u306eID\u306e\u30ea\u30b9\u30c8 $term_children \u3092 $term_id\u306b\u683c\u7d0d\u3057\u3066\u30eb\u30fc\u30d7<br \/>\n            foreach ( $term_children as $term_id ) {<\/p>\n<p>                \/\/ \u5b50\u30bf\u30fc\u30e0\u306eID\u3092\u5143\u306b\u5b50\u30bf\u30fc\u30e0\u306e\u60c5\u5831\u3092\u53d6\u5f97<br \/>\n                $term_child = $term_id;<\/p>\n<p>                \/\/ \u5b50\u30bf\u30fc\u30e0\u306eURL\u3092\u53d6\u5f97<br \/>\n                $taxonomy_m = 'musicains';<br \/>\n                $term_child = sanitize_term( $term_child, $taxonomy );<br \/>\n                $term_child_link = get_term_link( $term_child, $taxonomy );<br \/>\n                $descriptions = term_description( $term_child, $taxonomy );<br \/>\n                if ( is_wp_error( $term_child_link ) ) {<br \/>\n                    continue;<br \/>\n                }<br \/>\n                \/\/ \u5b50\u30bf\u30fc\u30e0\u306eURL\u3068\u540d\u79f0\u3068\u30ab\u30a6\u30f3\u30c8\u3092\u51fa\u529b<br \/>\n echo '<\/p>\n<li><a href=\"' . esc_url( $term_child_link ) . '\">' . $term_child->name . '<\/a>';echo' (Musician: ';\/* \u3053\u3053\u304b\u3089 *\/if( empty( $descriptions ) ){echo 'unknown';}<br \/>\nelseif( strpos( $descriptions, ',') !== false ){ $now_tags = explode(', ', $descriptions); foreach($now_tags as $now_tag){$tag_properties = get_term_by('name', $now_tag, $taxonomy_m); $now_tag_slug  = $tag_properties->slug; $term_m_links = get_term_link( $now_tag_slug, $taxonomy_m ); $now_tag_links = '<a href=\"' . esc_url( $term_m_links ) . '\">' . $now_tag . '<\/a>,'; $now_tag_link_a .= $now_tag_links;}; $now_tag_link_b = substr($now_tag_link_a, 0, -1); $now_tag_link_c = explode(',', $now_tag_link_b); $now_tag_link = implode(', ', $now_tag_link_c); echo $now_tag_link; unset($now_tag_link_a); }<br \/>\nelseif ( strpos( $descriptions, ',') === false ){$now_tag = $descriptions; $tag_properties = get_term_by('name', $now_tag, $taxonomy_m); $now_tag_slug = $tag_properties->slug; $term_m_links = get_term_link( $now_tag_slug, $taxonomy_m ); $now_tag_link = '<a href=\"' . esc_url( $term_m_links ) . '\">' . $now_tag . '<\/a>'; echo $now_tag_link;  unset($now_tag_link); }\/* \u3053\u3053\u307e\u3067 *\/echo')<\/li>\n<p>';}<br \/>\n            echo '<\/ul>\n<p>';<br \/>\n        }<br \/>\n    }<\/p>\n<p>    echo '<\/p><\/div>\n<p>';<br \/>\n}<br \/>\n?><br \/>\n<?php\n\/\/$terms_total =  wp_count_terms( 'lyrics') - 27;\n\/\/echo '\n\n<h3>Currently ' . $terms_total .' lyrics listed up.<\/h3>\n<p>';<br \/>\n?><\/p>\n<div class='watch-action'><div class='watch-position align-right'><div class='action-like'><a class='lbg-style1 like-5299 jlk' href='javascript:void(0)' data-task='like' data-post_id='5299' data-nonce='fdcf1a9ea5' rel='nofollow'><img class='wti-pixel' src='https:\/\/a-priori.org\/wordpress\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='\u3044\u3044\u306d!' \/><span class='lc-5299 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style1 unlike-5299 jlk' href='javascript:void(0)' data-task='unlike' data-post_id='5299' data-nonce='fdcf1a9ea5' rel='nofollow'><img class='wti-pixel' src='https:\/\/a-priori.org\/wordpress\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='\u30c0\u30e1\u307d!' \/><span class='unlc-5299 unlc'>0<\/span><\/a><\/div> <\/div> <div class='status-5299 status align-right'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p class=\"lead\">00<\/p>\n<p class=\"more-link-p\"><a class=\"btn btn-danger btn-sm\" href=\"https:\/\/a-priori.org\/wordpress\/test-2\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5299","page","type-page","status-publish","hentry","wpautop"],"_links":{"self":[{"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/pages\/5299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/comments?post=5299"}],"version-history":[{"count":2,"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/pages\/5299\/revisions"}],"predecessor-version":[{"id":5301,"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/pages\/5299\/revisions\/5301"}],"wp:attachment":[{"href":"https:\/\/a-priori.org\/wordpress\/wp-json\/wp\/v2\/media?parent=5299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}