function set_amp_style($style){
	$ampstyle = diver_file_get_contents(get_stylesheet_directory_uri().'/amp.css');
	return $ampstyle;
}
add_filter( 'diver_amp_style', 'set_amp_style' );

add_editor_style( 'editor-style.css' );

/* カスタマイズする場合にはこれより下に追記してください  */
//内部リンクをブログカードにするショートコード
function show_blogcard($atts) {
	$atts = shortcode_atts(array(
		'url' => "",
		'title' => "",
		'excerpt' => ""
	), $atts);
	
	$url = $atts['url'];
	$title = $atts['title'];
	$excerpt = $atts['excerpt'];
	
	//URLから投稿IDを取得
	$id = url_to_postid($url);
	//画像サイズの横幅を指定
	$img_width = "90";
	//画像サイズの高さを指定
	$img_height = "90";
	//アイキャッチ画像がない場合の画像を指定
	$no_image = '/wp-content/uploads/xxxx/xx/xxx.png';
	
	//タイトルを取得
	if(empty($title)){
		$title = esc_html(get_the_title($id));
	}
	
	//本文を取得
	if(has_excerpt($id)){
		//抜粋文字列がある場合
		$excerpt = wp_trim_words(get_the_excerpt($id), 72, '…' );
	} else {
		//抜粋文字列がない場合本文から切り出し
		$excerpt = wp_trim_words(strip_shortcodes(get_post($id)->post_content), 72, '…' );
	}
	
	//アイキャッチ画像を取得
	if(has_post_thumbnail($id)) {
		$img = wp_get_attachment_image_src(get_post_thumbnail_id($id), array($img_width, $img_height));
		$img_tag = '<img src="'. $img[0] .'" alt="'. $title .'" width="'. $img[1] .'" height="'. $img[2] .'" />';
	} else { 
		$img_tag = '<img src="'. $no_image .'" alt="" width="'. $img_width .'" height="'. $img_height .'" />';
	}
	
	// 変数を事前に空で初期化してエラーを防ぐ
	$sc_blogcard = '';

	//ブログカード部分のHTML
	$sc_blogcard .= '
	<div class="blogcard">
	<a href="'. $url .'">
	 <div class="blogcard_thumbnail">'. $img_tag .'</div>
	 <div class="blogcard_content">
	  <div class="blogcard_title">'. $title .'</div>
	  <div class="blogcard_excerpt">'. $excerpt .'</div>
	 </div>
	 <div class="clear"></div>
	</a>
	</div>';  
	
	return $sc_blogcard;  
}
//ショートコードに追加
add_shortcode("sc_blogcard", "show_blogcard");<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/wp-content/plugins/xml-sitemap-feed/assets/sitemap.xsl?ver=5.7.7"?>
<!-- generated-on="2026-10-25T03:40:48+00:00" -->
<!-- generator="XML Sitemap & Google News for WordPress" -->
<!-- generator-url="https://status301.net/wordpress-plugins/xml-sitemap-feed/" -->
<!-- generator-version="5.7.7" -->
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2026.xml</loc><lastmod>2026-02-19T22:13:46+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2025.xml</loc><lastmod>2025-09-08T12:03:32+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2024.xml</loc><lastmod>2024-05-09T19:46:02+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2023.xml</loc><lastmod>2026-08-04T18:04:07+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2022.xml</loc><lastmod>2023-08-27T10:58:32+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2021.xml</loc><lastmod>2022-12-11T23:29:23+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2020.xml</loc><lastmod>2023-12-21T09:35:23+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-post.2019.xml</loc><lastmod>2023-12-19T10:31:29+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-posttype-page.xml</loc><lastmod>2026-09-13T23:25:41+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-author.xml</loc><lastmod>2026-02-19T22:06:00+09:00</lastmod></sitemap>
<sitemap><loc>https://gakudoclub.com/sitemap-news.xml</loc><lastmod>2026-02-19T22:06:00+09:00</lastmod></sitemap>
</sitemapindex>
