This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Previous/next post navigation. | |
| the_post_navigation( array( | |
| 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' . | |
| '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' . | |
| '<span class="post-title">%title</span>', | |
| 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' . | |
| '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' . | |
| '<span class="post-title">%title</span>', | |
| ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $post_id = $post->ID; // current post ID | |
| $cat = get_the_category(); | |
| $current_cat_id = $cat[0]->cat_ID; // current category ID | |
| $args = array( | |
| 'category' => $current_cat_id, | |
| 'orderby' => 'post_date', | |
| 'order' => 'DESC' | |
| ); | |
| $posts = get_posts( $args ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul.inline01 {font-size:0px;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul.inline01 li { | |
| display:inline-block; | |
| border:1px #ccc solid; | |
| list-style:none; | |
| padding:0 3px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul class="inline01"> | |
| <li>メニュー1</li> | |
| <li>メニュー2</li> | |
| <li>メニュー3</li> | |
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_shortcode('ss_screenshot', 'ss_screenshot_shortcode'); | |
| function ss_screenshot_shortcode($atts){ | |
| $width = intval($atts['width']); | |
| $width = (100 <= $width && $width <= 300) ? $width : 200; | |
| $site = trim($atts['site']); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ss_screenshot width='300' site='http://www.yahoo.co.jp'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| remove_action('wp_head', 'print_emoji_detection_script', 7); | |
| remove_action('wp_print_styles', 'print_emoji_styles'); | |
| remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
| remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hook_javascript() { | |
| ?> | |
| <script> | |
| alert('Page is loading...'); | |
| </script> | |
| <?php | |
| } | |
| add_action('wp_head', 'hook_javascript'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hook_css() { | |
| ?> | |
| <style> | |
| .wp_head_example { | |
| background-color : #f1f1f1; | |
| } | |
| </style> | |
| <?php | |
| } | |
| add_action('wp_head', 'hook_css'); |