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 custom_thumnail($html, $post_id, $post_image_id,$size,$attr){ | |
| if(has_post_thumbnail()){ | |
| if(is_single() && ! wp_is_mobile()){ //singleページ&PCアイキャッチ用 | |
| $eyecatch = get_the_post_thumbnail( 'large_size' ); | |
| $html = '<img src="'; | |
| $html .= 'ローディング画像URL'; | |
| $html .= '" data-echo="'; | |
| $html .= $eyecatch; | |
| $html .= '" alt="'; | |
| $html .= get_post_meta( $post_image_id, '_wp_attachment_image_alt', true ); |
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 cps_category_title($display = true){ | |
| global $post; | |
| $t_id = get_category( intval( get_query_var('cat') ) )->term_id; | |
| $cat_class = get_category($t_id); | |
| $cat_option = get_option($t_id); | |
| if( isset($cat_option['cps_meta_title']) && $cat_option['cps_meta_title'] !== '' ){ | |
| $category_title = $cat_option['cps_meta_title']; |
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 jin_blocks_categories( $categories, $post ) { | |
| return array_merge( | |
| $categories, | |
| array( | |
| array( | |
| 'slug' => 'jin-blocks', | |
| 'title' => __( 'Jin Blocks', 'jin-blocks' ), | |
| 'icon' => 'wordpress', | |
| ), | |
| ) |
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
| class Simple_GA_Ranking_Widget extends WP_Widget { | |
| public function __construct() { | |
| $widget_ops = array('classname' => 'widget-popular', 'description' => __('Simple Ga Rankingウィジェットです')); | |
| $control_ops = array('width' => 400, 'height' => 350); | |
| parent::__construct('Simple_GA_Ranking_Widget', __('Simple GA Rankingのウィジェット'), $widget_ops, $control_ops); | |
| } | |
| public function widget( $args, $instance ) { | |
| extract($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
| foreach ($items as &$Retitle) { | |
| $Retitle["Title"] = preg_replace('/\s\([\W-\w]*\)$/','',$Retitle["Title"]); | |
| } | |
| unset($Retitle); |
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 ($) { | |
| if (!$) return; | |
| var ua = navigator.userAgent, | |
| isIE = ua.match(/msie/i), | |
| isIE6 = isIE && ua.match(/msie 6\./i), | |
| location = window.location, | |
| isHttpsScheme = location && location.protocol && location.protocol == 'https:'; | |
| $.extend({ | |
| amazonjs:{ | |
| imageAttributes: ['SmallImage', 'MediumImage', 'LargeImage'], |
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
| <?php | |
| if(($paged >= 2 || $page >= 2 ) && ! is_404()){ | |
| echo "<meta name="robots content="noindex >"; | |
| } ?> |
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
| <?php global $page, $paged;if( is_home() || is_front_page() ): ?> | |
| <?php $mydesc = get_bloginfo('description') ?> | |
| <?php if( ! empty( $mydesc ) ): ?> | |
| <title><?php bloginfo('name'); ?>|<?php bloginfo('description'); ?></title> | |
| <?php else: ?> | |
| <title><?php bloginfo('name'); ?></title> | |
| <?php endif; ?> | |
| <?php elseif(is_page()): ?> | |
| <title><?php wp_title('','right'); ?>|<?php bloginfo('name'); ?></title> | |
| <?php elseif(($paged >= 2 || $page >= 2 ) && ! is_404()): ?> |