画像が表示されなくなった

  • このトピックには4件の返信、1人の参加者があり、最後に葉月により2年、 5ヶ月前に更新されました。
4件の返信スレッドを表示中
  • 投稿者
    投稿
    • #1166 返信
      葉月
      ゲスト

      改ページの仕様変更を拝見しテーマをバージョンアップしました。

      ページは仕様変更のとおり煮変わったのですが。

      イラストページ、single-works.phpを使ったページだけ画像が表示されなくなってしまいました。

      管理画面の変更をプレビューではきちんと表示されているのですが。

      サイトを見ると白い空白になってしまいます。

      single-works.phpはまったく手を加えていません。

      こちらだけの症状なのか、テーマの不具合なのか分からなかったため書き込みさせていただきました。

    • #1176 返信
      gtgt
      キーマスター

      EASELのご利用ありがとうございます。

      現在当デモサイトでは同様の事例が確認されておりません。

      お使いのサーバー名、PHPバージョン、WordPressのバージョンを教えていただけますでしょうか。
      また、functions.phpやstyle.cssに手を加えている場合はそちらも併せてお書き添えください。

    • #1180 返信
      葉月
      ゲスト

      返信ありがとうございます。

      サーバー名:さくらインターネット

      PHPバージョン:7.4.23

      WordPressバージョン: 5.8.1

      functions.phpにかなり書き加えているのでやはりわたしのほうが原因ですね。
      ちゃんとした知識を持っていないため対処が分からず申し訳ありません。
      style.cssには直接手を加えておらずカスタマイズの追加CSSに書いています。
      かなり無駄が多いので全部見ていただくのは無理かと思いますが貼り付けさせていただきます。

      自己責任の範囲かと思いますが確認をしていただけたら幸いです。

       

      //更新日時を記事と作品に表示する
      add_filter( ‘manage_edit-post_columns’, ‘aco_last_modified_admin_column’ );

      // Create the last modified column
      function aco_last_modified_admin_column( $columns ) {
      $columns[‘modified-last’] =__( ‘最終更新日’, ‘aco’ );
      return $columns;
      }
      add_filter( ‘manage_edit-post_sortable_columns’, ‘aco_sortable_last_modified_column’ );

      // Allow that content to be sortable by modified time information
      function aco_sortable_last_modified_column( $columns ) {
      $columns[‘modified-last’] = ‘modified’;
      return $columns;
      }
      add_action( ‘manage_posts_custom_column’, ‘aco_last_modified_admin_column_content’, 10, 2 );

      // Format the output
      function aco_last_modified_admin_column_content( $column_name, $post_id ) {

      // Do not continue if this is not the modified column
      if ( ‘modified-last’ != $column_name )
      return;

      $modified_date = the_modified_date( ‘Y年Md日’ );

      echo $modified_date;
      }

      function my_manage_edit_columns( $columns ) {
      $columns[‘modified’] = ‘更新日’;
      return $columns;
      }
      add_filter( ‘manage_edit-works_columns’, ‘my_manage_edit_columns’ );

      function my_manage_edit_sortable_columns( $columns ) {
      $columns[‘modified’] = ‘modified’;
      return $columns;
      }
      add_filter( ‘manage_edit-works_sortable_columns’, ‘my_manage_edit_sortable_columns’ );

      function my_manage_posts_custom_column( $column_name ) {
      if ( ‘modified’ == $column_name ) {
      the_modified_date();
      }
      }
      add_action( ‘manage_works_posts_custom_column’, ‘my_manage_posts_custom_column’ );

      //—————————————————————————
      // 記事投稿(編集)画面に更新レベルのボックス追加
      //—————————————————————————

      /* ボックス追加 */
      if( function_exists( ‘thk_post_update_level’ ) === false ):
      function thk_post_update_level() {
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘post’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘firstlove’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘afterdays’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘atarayo’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘mybear’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘long’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘medium’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘short’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘short_novel’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘works’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘series’,’side’, ‘high’ );
      add_meta_box( ‘update_level’, ‘更新日変更’, ‘post_update_level_box’, ‘ss’,’side’, ‘high’ );
      }
      add_action( ‘admin_menu’, ‘thk_post_update_level’ );
      endif;

      /* メインフォーム */
      if( function_exists( ‘post_update_level_box’ ) === false ):
      function post_update_level_box() {
      global $post;
      ?>
      <div style=”padding-top: 5px; overflow: hidden;”>
      <div style=”padding:5px 0″><input name=”update_level” type=”radio” value=”high” checked=”checked” />通常更新</div>
      <div style=”padding: 5px 0″><input name=”update_level” type=”radio” value=”low” />修正のみ(更新日時を変更せず記事更新)</div>
      <div style=”padding: 5px 0″><input name=”update_level” type=”radio” value=”del” />更新日時消去(公開日時と同じにする)</div>
      <div style=”padding: 5px 0; margin-bottom: 10px”><input id=”update_level_edit” name=”update_level” type=”radio” value=”edit” />更新日時を手動で変更</div>
      <?php
      if( get_the_modified_date( ‘c’ ) ) {
      $stamp = ‘更新日時: <span style=”font-weight:bold”>’ . get_the_modified_date( __( ‘M j, Y @ H:i’ ) ) . ‘</span>’;
      }
      else {
      $stamp = ‘更新日時: <span style=”font-weight:bold”>未更新</span>’;
      }
      $date = date_i18n( get_option(‘date_format’) . ‘ @ ‘ . get_option(‘time_format’), strtotime( $post->post_modified ) );
      ?>
      <style>
      .modtime { padding: 2px 0 1px 0; display: inline !important; height: auto !important; }
      .modtime:before { font: normal 20px/1 ‘dashicons’; content: ‘\f145’; color: #888; padding: 0 5px 0 0; top: -1px; left: -1px; position: relative; vertical-align: top; }
      #timestamp_mod_div { padding-top: 5px; line-height: 23px; }
      #timestamp_mod_div p { margin: 8px 0 6px; }
      #timestamp_mod_div input { border-width: 1px; border-style: solid; }
      #timestamp_mod_div select { height: 21px; line-height: 14px; padding: 0; vertical-align: top;font-size: 12px; }
      #aa_mod, #jj_mod, #hh_mod, #mn_mod { padding: 1px; font-size: 12px; }
      #jj_mod, #hh_mod, #mn_mod { width: 2em; }
      #aa_mod { width: 3.4em; }
      </style>
      <span class=”modtime”><?php printf( $stamp, $date ); ?></span>
      <div id=”timestamp_mod_div” onkeydown=”document.getElementById(‘update_level_edit’).checked=true” onclick=”document.getElementById(‘update_level_edit’).checked=true”>
      <?php thk_time_mod_form(); ?>
      </div>
      </div>
      <?php
      }
      endif;

      /* 更新日時変更の入力フォーム */
      if( function_exists( ‘thk_time_mod_form’ ) === false ):
      function thk_time_mod_form() {
      global $wp_locale, $post;

      $tab_index = 0;
      $tab_index_attribute = ”;
      if ( (int) $tab_index > 0 ) {
      $tab_index_attribute = ‘ tabindex=”‘ . $tab_index . ‘”‘;
      }

      $jj_mod = mysql2date( ‘d’, $post->post_modified, false );
      $mm_mod = mysql2date( ‘m’, $post->post_modified, false );
      $aa_mod = mysql2date( ‘Y’, $post->post_modified, false );
      $hh_mod = mysql2date( ‘H’, $post->post_modified, false );
      $mn_mod = mysql2date( ‘i’, $post->post_modified, false );
      $ss_mod = mysql2date( ‘s’, $post->post_modified, false );

      $year = ‘<label for=”aa_mod” class=”screen-reader-text”>年’ .
      ‘</label><input type=”text” id=”aa_mod” name=”aa_mod” value=”‘ .
      $aa_mod . ‘” size=”4″ maxlength=”4″‘ . $tab_index_attribute . ‘ autocomplete=”off” />年’;

      $month = ‘<label for=”mm_mod” class=”screen-reader-text”>月’ .
      ‘</label><select id=”mm_mod” name=”mm_mod”‘ . $tab_index_attribute . “>\n”;
      for( $i = 1; $i < 13; $i = $i +1 ) {
      $monthnum = zeroise($i, 2);
      $month .= “\t\t\t” . ‘<option value=”‘ . $monthnum . ‘” ‘ . selected( $monthnum, $mm_mod, false ) . ‘>’;
      $month .= $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
      $month .= “</option>\n”;
      }
      $month .= ‘</select>’;

      $day = ‘<label for=”jj_mod” class=”screen-reader-text”>日’ .
      ‘</label><input type=”text” id=”jj_mod” name=”jj_mod” value=”‘ .
      $jj_mod . ‘” size=”2″ maxlength=”2″‘ . $tab_index_attribute . ‘ autocomplete=”off” />日’;
      $hour = ‘<label for=”hh_mod” class=”screen-reader-text”>時’ .
      ‘</label><input type=”text” id=”hh_mod” name=”hh_mod” value=”‘ . $hh_mod .
      ‘” size=”2″ maxlength=”2″‘ . $tab_index_attribute . ‘ autocomplete=”off” />’;
      $minute = ‘<label for=”mn_mod” class=”screen-reader-text”>分’ .
      ‘</label><input type=”text” id=”mn_mod” name=”mn_mod” value=”‘ . $mn_mod .
      ‘” size=”2″ maxlength=”2″‘ . $tab_index_attribute . ‘ autocomplete=”off” />’;

      printf( ‘%1$s %2$s %3$s @ %4$s : %5$s’, $year, $month, $day, $hour, $minute );
      echo ‘<input type=”hidden” id=”ss_mod” name=”ss_mod” value=”‘ . $ss_mod . ‘” />’;
      }
      endif;

      /* 「修正のみ」は更新しない。それ以外は、それぞれの更新日時に変更する */
      if( function_exists( ‘thk_insert_post_data’ ) === false ):
      function thk_insert_post_data( $data, $postarr ){
      $mydata = isset( $_POST[‘update_level’] ) ? $_POST[‘update_level’] : null;

      if( $mydata === ‘low’ ){
      unset( $data[‘post_modified’] );
      unset( $data[‘post_modified_gmt’] );
      }
      elseif( $mydata === ‘edit’ ) {
      $aa_mod = $_POST[‘aa_mod’] <= 0 ? date(‘Y’) : $_POST[‘aa_mod’];
      $mm_mod = $_POST[‘mm_mod’] <= 0 ? date(‘n’) : $_POST[‘mm_mod’];
      $jj_mod = $_POST[‘jj_mod’] > 31 ? 31 : $_POST[‘jj_mod’];
      $jj_mod = $jj_mod <= 0 ? date(‘j’) : $jj_mod;
      $hh_mod = $_POST[‘hh_mod’] > 23 ? $_POST[‘hh_mod’] -24 : $_POST[‘hh_mod’];
      $mn_mod = $_POST[‘mn_mod’] > 59 ? $_POST[‘mn_mod’] -60 : $_POST[‘mn_mod’];
      $ss_mod = $_POST[‘ss_mod’] > 59 ? $_POST[‘ss_mod’] -60 : $_POST[‘ss_mod’];
      $modified_date = sprintf( ‘%04d-%02d-%02d %02d:%02d:%02d’, $aa_mod, $mm_mod, $jj_mod, $hh_mod, $mn_mod, $ss_mod );
      if ( ! wp_checkdate( $mm_mod, $jj_mod, $aa_mod, $modified_date ) ) {
      unset( $data[‘post_modified’] );
      unset( $data[‘post_modified_gmt’] );
      return $data;
      }
      $data[‘post_modified’] = $modified_date;
      $data[‘post_modified_gmt’] = get_gmt_from_date( $modified_date );
      }
      elseif( $mydata === ‘del’ ) {
      $data[‘post_modified’] = $data[‘post_date’];
      }
      return $data;
      }
      add_filter( ‘wp_insert_post_data’, ‘thk_insert_post_data’, 10, 2 );
      endif;

      //デフォルトの投稿のラベル変更
      function change_post_menu_label() {
      global $menu;
      global $submenu;
      $menu[5][0] = ‘ヒトリゴト’;
      $submenu[‘edit.php’][5][0] = ‘ヒトリゴト一覧’;
      $submenu[‘edit.php’][10][0] = ‘新規追加’;
      $submenu[‘edit.php’][16][0] = ‘タグ’;
      //echo “;
      }
      function change_post_object_label() {
      global $wp_post_types;
      $labels = &$wp_post_types[‘post’]->labels;
      $labels->name = ‘ヒトリゴト’;
      $labels->singular_name = ‘ヒトリゴト’;
      $labels->add_new = _x(‘追加’, ‘ヒトリゴト’);
      $labels->add_new_item = ‘ヒトリゴト追加’;
      $labels->edit_item = ‘ヒトリゴトの編集’;
      $labels->new_item = ‘新規ヒトリゴト’;
      $labels->view_item = ‘ヒトリゴトを表示’;
      $labels->search_items = ‘ヒトリゴトを検索’;
      $labels->not_found = ‘記事が見つかりませんでした’;
      $labels->not_found_in_trash = ‘ゴミ箱に記事は見つかりませんでした’;
      }
      add_action( ‘init’, ‘change_post_object_label’ );
      add_action( ‘admin_menu’, ‘change_post_menu_label’ );

      // ウィジェットの追加
      register_sidebar(array(
      ‘name’ => ‘必読用’ ,
      ‘id’ => ‘free’ ,
      ‘before_widget’ => ‘<div class=”widget-area”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ‘<h3 class=”area-title”>’,
      ‘after_title’ => ‘</h3>’
      ));

      register_sidebar(array(
      ‘name’ => ‘ヘッダーコンテンツ用’ ,
      ‘id’ => ‘free02’ ,
      ‘before_widget’ => ‘<div class=”widget-area”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ‘<h3 class=”area-title”>’,
      ‘after_title’ => ‘</h3>’
      ));

      register_sidebar(array(
      ‘name’ => ‘はじ恋フッター’ ,
      ‘id’ => ‘hazi-tex02’ ,
      ‘before_widget’ => ‘<div class=”widget-area”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ‘<h3 class=”area-title”>’,
      ‘after_title’ => ‘</h3>’
      ));

      register_sidebar(array(
      ‘name’ => ‘HOME用’ ,
      ‘id’ => ‘sidebar3’ ,
      ‘before_widget’ => ‘<div class=”widget-area”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ‘<h3 class=”area-title”>’,
      ‘after_title’ => ‘</h3>’
      ));

      register_sidebar(array(
      ‘name’ => ‘小説ページ用’ ,
      ‘id’ => ‘sidebar4’ ,
      ‘before_widget’ => ‘<div class=”widget-area”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ‘<h3 class=”area-title”>’,
      ‘after_title’ => ‘</h3>’
      ));

      register_sidebar(array(
      ‘name’ => ‘モバイルTOP用メニュー’ ,
      ‘id’ => ‘sidebar5’ ,
      ‘before_widget’ => ‘<div class=”widget-menutop”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ‘<h3 class=”area-title”>’,
      ‘after_title’ => ‘</h3>’
      ));
      register_sidebar(array(
      ‘name’ => ‘TOPの挨拶用’ ,
      ‘id’ => ‘sidebar6’ ,
      ‘before_widget’ => ‘<div class=”widget-menutop”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ‘<h3 class=”area-title”>’,
      ‘after_title’ => ‘</h3>’
      ));

       

      //自動でパーマリンク連番生成
      function auto_post_slug( $slug, $post_ID, $post_status, $post_type ) {
      if( $post_type == ‘post’ ){//ブログに実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘post’ . $post_ID ;
      }
      }
      if( $post_type == ‘works’ ){//SSに実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘illust’ . $post_ID ;
      }
      }
      if( $post_type == ‘ss’ ){//SSに実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘firstlove’ ){//はじまりの恋に実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘atarayo’ ){//可惜夜に実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘short’ ){//短編に実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘short_novel’ ){//短編連作に実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘medium’ ){//中編に実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘series’ ){//シリーズに実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘mybear’ ){//マイベアに実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }
      if( $post_type == ‘afterdays’ ){//afterに実行
      if ( preg_match( ‘/(%[0-9a-f]{2})+/’, $slug ) ) {
      $slug = ‘novel’ . $post_ID ;
      }
      }

      return $slug;
      }
      add_filter( ‘wp_unique_post_slug’, ‘auto_post_slug’, 10, 4 );

      //画像のクラスなど削除
      add_filter( ‘image_send_to_editor’, ‘remove_image_attribute’, 10 );
      add_filter( ‘post_thumbnail_html’, ‘remove_image_attribute’, 10 );

      function remove_image_attribute( $html ){
      $html = preg_replace( ‘/(width|height)=”\d*”\s/’, ”, $html );
      $html = preg_replace( ‘/class=[\'”]([^\'”]+)[\'”]/i’, ”, $html );
      $html = preg_replace( ‘/title=[\'”]([^\'”]+)[\'”]/i’, ”, $html );
      $html = preg_replace( ‘//’, ”, $html );
      $html = preg_replace( ‘/<\/a>/’, ”, $html );
      return $html;
      }

      /* the_archive_title アーカイブの余計な文字を削除 */
      add_filter( ‘get_the_archive_title’, function ($title) {
      if (is_category()) {
      $title = single_cat_title(”,false);
      } elseif (is_tag()) {
      $title = single_tag_title(”,false);
      } elseif (is_tax()) {
      $title = single_term_title(”,false);
      } elseif (is_post_type_archive() ){
      $title = post_type_archive_title(”,false);
      } elseif (is_date()) {
      $title = get_the_time(‘Y年n月’);
      } elseif (is_search()) {
      $title = ‘検索結果:’.esc_html( get_search_query(false) );
      } elseif (is_404()) {
      $title = ‘「404」ページが見つかりません’;
      } else {

      }
      return $title;
      });

      /* 【出力カスタマイズ】タクソノミーアーカイブを順序順で表示 */
      function my_order_devcat( $query ) {
      if (is_tax(array(‘short_chapter’,’atarayo_chapter’,’first_chapter’,’medium_chapter’,’series_chapter’,’mybear_chapter’,’after_chapter’))) {
      if( $query->is_tax() ) {
      $query->set(‘order’, ‘ASC’);
      $query->set( ‘orderby’, ‘date’ );
      }
      }
      }
      add_action( ‘pre_get_posts’, ‘my_order_devcat’ );

      //画像をリサイズしない

      function remove_image_sizes( $sizes ) {
      unset( $sizes[‘medium_large’] );
      unset( $sizes[‘1536×1536’] );
      unset( $sizes[‘2048×2048’] );
      return $sizes;
      }
      add_filter( ‘intermediate_image_sizes_advanced’, ‘remove_image_sizes’ );

      function remove_extra_image_sizes() {
      remove_image_size( ‘bones-thumb-600’ );
      remove_image_size( ‘bones-thumb-300’ );
      }
      add_action(‘init’, ‘remove_extra_image_sizes’);

      //カテゴリー絞り込み
      function add_post_taxonomy_restrict_filter() {
      global $post_type;
      if ( ‘firstlove’ == $post_type ) {
      ?>
      <select name=”first_chapter”>
      <option value=””>カテゴリー指定なし</option>
      <?php
      $terms = get_terms(‘first_chapter’);
      foreach ($terms as $term) { ?>
      <option value=”<?php echo $term->slug; ?>”><?php echo $term->name; ?></option>
      <?php } ?>
      </select>
      <?php
      }
      else if ( ‘atarayo’ == $post_type ) {
      ?>
      <select name=”atarayo_chapter”>
      <option value=””>カテゴリー指定なし</option>
      <?php
      $terms = get_terms(‘atarayo_chapter’);
      foreach ($terms as $term) { ?>
      <option value=”<?php echo $term->slug; ?>”><?php echo $term->name; ?></option>
      <?php } ?>
      </select>
      <?php
      }
      else if ( ‘series’ == $post_type ) {
      ?>
      <select name=”series_chapter”>
      <option value=””>カテゴリー指定なし</option>
      <?php
      $terms = get_terms(‘series_chapter’);
      foreach ($terms as $term) { ?>
      <option value=”<?php echo $term->slug; ?>”><?php echo $term->name; ?></option>
      <?php } ?>
      </select>
      <?php
      }
      else if ( ‘medium’ == $post_type ) {
      ?>
      <select name=”medium_chapter”>
      <option value=””>カテゴリー指定なし</option>
      <?php
      $terms = get_terms(‘medium_chapter’);
      foreach ($terms as $term) { ?>
      <option value=”<?php echo $term->slug; ?>”><?php echo $term->name; ?></option>
      <?php } ?>
      </select>
      <?php
      }
      else if ( ‘short_novel’ == $post_type ) {
      ?>
      <select name=”short_chapter”>
      <option value=””>カテゴリー指定なし</option>
      <?php
      $terms = get_terms(‘short_chapter’);
      foreach ($terms as $term) { ?>
      <option value=”<?php echo $term->slug; ?>”><?php echo $term->name; ?></option>
      <?php } ?>
      </select>
      <?php
      }
      else if ( ‘gallery’ == $post_type ) {
      ?>
      <select name=”works”>
      <option value=””>カテゴリー指定なし</option>
      <?php
      $terms = get_terms(‘works’);
      foreach ($terms as $term) { ?>
      <option value=”<?php echo $term->slug; ?>”><?php echo $term->name; ?></option>
      <?php } ?>
      </select>
      <?php
      }
      }
      add_action( ‘restrict_manage_posts’, ‘add_post_taxonomy_restrict_filter’ );

      // アイキャッチ画像項目を追加します。
      function my_manage_columns( $columns ) {
      if ( ! is_array( $columns ) ) {
      $columns = array();
      }
      $new_columns = array();
      foreach ( $columns as $key => $value ) {
      if ( $key == ‘title’ ) {
      $new_columns[‘featured-image’] = ‘画像’;
      }
      $new_columns[$key] = $value;
      }
      return $new_columns;
      }

      add_filter( “manage_posts_columns”, ‘my_manage_columns’ ); // 投稿一覧
      add_filter( “manage_pages_columns”, ‘my_manage_columns’ ); // 固定ページ一覧

      // アイキャッチ画像項目を出力します。
      function my_manage_custom_column( $column, $post_id ) {
      if ( $column == ‘featured-image’ ) {
      if ( has_post_thumbnail( $post_id ) ) {
      echo get_the_post_thumbnail( $post_id, ‘thumbnail’ );
      } else {
      echo ‘<div class=”featured-image-none”></div>’;
      }
      }
      }

      add_action( “manage_posts_custom_column”, ‘my_manage_custom_column’, 10, 2 ); // 投稿一覧
      add_action( “manage_pages_custom_column”, ‘my_manage_custom_column’, 10, 2 ); // 固定ページ一覧

      // アイキャッチ画像項目のスタイルを出力します。
      function my_admin_head_edit() {
      $style = <<<STYLE
      .fixed .column-featured-image {
      width: 60px;
      }
      .featured-image img,
      .featured-image div {
      width: 48px;
      height: 48px;
      }
      .featured-image-none {
      border: #cccccc dashed 1px;
      }
      .wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-featured-image::before {
      content: “”;
      }
      .wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-featured-image {
      display: table-cell !important;
      }
      .wp-list-table tr:not(.inline-edit-row):not(.no-items) td.hidden {
      display: none !important;
      }
      STYLE;

      echo ‘<style type=”text/css” id=”my-featured-image-column-css”>’ . “\n”;
      echo $style;
      echo “</style>\n”;
      }

      add_action( ‘admin_head-edit.php’, ‘my_admin_head_edit’, 100 );

      // 投稿一覧にアイキャッチ画像フィルター選択項目を追加します。
      function my_restrict_manage_posts_featured_image( $post_type ) {
      if (
      $post_type == ‘post’ // 投稿一覧
      || $post_type == ‘page’ // 固定ページ一覧
      ) {
      $filter = isset( $_GET[‘featured_image_filter’] ) ? $_GET[‘featured_image_filter’] : ”;
      echo ‘<select name=”featured_image_filter” id=”featured_image_filter”>’;
      echo ‘<option value=”all” ‘ . selected( ‘all’, $filter ) . ‘>アイキャッチ画像</option>’;
      echo ‘<option value=”notset” ‘ . selected( ‘notset’, $filter ) . ‘>未設定</option>’;
      echo ‘</select>’ . “\n”;
      }
      }
      add_action( ‘restrict_manage_posts’, ‘my_restrict_manage_posts_featured_image’ );

      // 投稿一覧のクエリ―にアイキャッチ画像の条件を設定します。
      function my_parse_query_featured_image( $query ) {
      global $pagenow;

      if ( is_admin() && $pagenow == ‘edit.php’ && isset( $_GET[‘featured_image_filter’] ) && $_GET[‘featured_image_filter’] != ‘all’ ) {
      $query->query_vars[‘meta_key’] = ‘_thumbnail_id’;
      $query->query_vars[‘meta_compare’] = ‘NOT EXISTS’;
      $query->query_vars[‘meta_value’] = ”;
      }
      }
      add_filter( ‘parse_query’, ‘my_parse_query_featured_image’ );

      function my_scripts() {
      // 自作jsファイルの読み込み
      wp_enqueue_script( ‘shiori’, get_theme_file_uri(‘/js/jquery.shiori.js’) );
      wp_enqueue_script( ‘pulldown’, get_theme_file_uri(‘/js/jquery.pulldown.js’) );
      // CDNから「jquery.cookie.js」を読み込む
      wp_enqueue_script( ‘jquery-cookie’, ‘
      https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js&#8217;, array(‘jquery’), ‘1.4.1’, true);
      }
      add_action( ‘wp_enqueue_scripts’, ‘my_scripts’ );

      //投稿ページに更新履歴を表示しない
      function twpp_exclude_category( $query ) {
      if ( is_admin() || ! $query->is_main_query() ) {
      return;
      }
      if ( $query->is_home() ) {
      $query->set( ‘category__not_in’, array(355,356,357,358) );
      }
      }
      add_action( ‘pre_get_posts’, ‘twpp_exclude_category’ );

      function customize_category_args( $args ) {
      $args = array(
      ‘exclude’ => ‘355,356,357,358’
      );//除外したいカテゴリーIDを指定
      return $args;
      }
      add_filter( ‘widget_categories_args’, ‘customize_category_args’ );

      //最近の投稿から特定のカテゴリ除外
      add_filter(‘widget_posts_args’, ‘modify_widget_args’);
      function modify_widget_args() {
      $r = array(
      ‘category__not_in’ => array(355,356,357,358), // ★カンマ区切りでカテゴリーIDを指定
      ‘post_status’ => ‘publish’,
      ‘posts_per_page’ => 2,
      );
      return $r;
      }

      // カテゴリ一覧(記事数を含む)
      function echo_list_cats_and_count($content) {
      // カテゴリ情報取得
      $cats = get_categories(array(‘exclude’ => ‘355,356,357,358,362’));
      // Buffer output
      ob_start();
      ?>
      <div class=”widget sidebar-widget widget_categories”>

      </div>
      <?php
      // clear buffer
      $output = ob_get_clean();
      return $output;
      }
      // カテゴリ一覧を表示するショートコードを作成
      add_shortcode(‘list_cats_and_count’, ‘echo_list_cats_and_count’);

      //カスタム投稿の記事を日付順に並べる
      function admin_custom_posttype_order($wp_query) {
      if( is_admin() ) {
      $post_type = $wp_query->query[‘post_type’];
      if($post_type = array(‘short’,’atarayo’,’firstlove’,’medium’,’series’,’short_novel’,’afterdays’,’mybear’)) {
      $wp_query->set(‘orderby’,’date’); //並べ替えの基準(日付)
      $wp_query->set(‘order’,’DESC’); //新しい順。古い順にしたい場合はASCを指定
      }
      }
      }
      add_filter(‘pre_get_posts’, ‘admin_custom_posttype_order’);

      //管理画面のタグをチェックボックス
      function _re_register_post_tag_taxonomy() {

      $tag_slug_args = get_taxonomy(‘post_tag’); // returns an object
      $tag_slug_args -> hierarchical = true;
      $tag_slug_args -> meta_box_cb = ‘post_categories_meta_box’;

      register_taxonomy( ‘post_tag’, ‘post’,(array) $tag_slug_args);

      }
      add_action( ‘init’, ‘_re_register_post_tag_taxonomy’, 1 );

      function my_wp_is_mobile() {
      static $is_mobile;

      if ( isset($is_mobile) )
      return $is_mobile;

      if ( empty($_SERVER[‘HTTP_USER_AGENT’]) ) {
      $is_mobile = false;
      } elseif (
      strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Android’) !== false
      || strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Silk/’) !== false
      || strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Kindle’) !== false
      || strpos($_SERVER[‘HTTP_USER_AGENT’], ‘BlackBerry’) !== false
      || strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Opera Mini’) !== false ) {
      $is_mobile = true;
      } elseif (strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Mobile’) !== false && strpos($_SERVER[‘HTTP_USER_AGENT’], ‘iPad’) == false) {
      $is_mobile = true;
      } elseif (strpos($_SERVER[‘HTTP_USER_AGENT’], ‘iPad’) !== false) {
      $is_mobile = false;
      } else {
      $is_mobile = false;
      }

      return $is_mobile;
      }
      //header内の余計なものを削除
      add_theme_support( ‘menus’ );
      remove_action(‘wp_head’, ‘wp_generator’);
      remove_action(‘wp_head’, ‘rsd_link’);
      remove_action(‘wp_head’, ‘wlwmanifest_link’);
      function disable_emoji() {
      remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
      remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
      remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
      remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );
      remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ );
      remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ );
      remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ );
      }
      add_action( ‘init’, ‘disable_emoji’ );

      if ( has_action( ‘wp_head’, ‘wp_generator’ ) )
      remove_action( ‘wp_head’, ‘wp_generator’ );
      foreach ( array( ‘rss2_head’, ‘commentsrss2_head’, ‘rss_head’, ‘rdf_header’,
      ‘atom_head’, ‘comments_atom_head’, ‘opml_head’, ‘app_head’ ) as $action ) {
      if ( has_action( $action, ‘the_generator’ ) )
      remove_action( $action, ‘the_generator’ );
      }

      //フォントの読み込み
      function optm_css($code)
      {
      // Add font-display:swap to each css property
      return $code = str_replace(‘@font-face{‘,’@font-face{font-display:swap;’, $code);
      }
      ;

      add_filter(‘autoptimize_css_after_minify’, ‘optm_css’);

      // Filter results.
      $tmp_code = apply_filters( ‘autoptimize_css_after_minify’, $code );
      if ( ! empty( $tmp_code ) ) {
      $code = $tmp_code;
      unset( $tmp_code );
      }

      //メニューバーの一部を非表示
      function remove_wp_nodes()
      {
      global $wp_admin_bar;
      $wp_admin_bar->remove_node( ‘new-page’ ); //新規固定ページ
      $wp_admin_bar->remove_node( ‘comments’ ); // コメント
      $wp_admin_bar->remove_node( ‘updates’ ); //更新通知アイコン
      $wp_admin_bar->remove_node( ‘new-content’ ); //新規追加
      $wp_admin_bar->remove_node( ‘notes’ ); //ログイン
      $wp_admin_bar->remove_node( ‘wp-logo’ );//ロゴ
      }
      add_action( ‘admin_bar_menu’, ‘remove_wp_nodes’, 999 );

      //管理ツールバーにメニュー追加
      function customize_admin_bar_menu($wp_admin_bar){
      //バーにメニューを追加
      $title = sprintf(
      ‘<span class=”ab-label”>%s</span>’,
      ‘管理メニュー’//親メニューラベル
      );
      $wp_admin_bar->add_menu(array(
      ‘id’ => ‘dashboard_menu’,
      ‘meta’ => array(),
      ‘title’ => $title
      ));
      //サブメニューを追加
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-dashboard’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘ダッシュボード’, // ラベル
      ‘href’ => home_url(‘/wp-admin/’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-customize’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘カスタマイズ’, // ラベル
      ‘href’ => home_url(‘/wp-admin/customize.php?return=%2Fwordpress%2Fwp-admin%2Fthemes.php’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-stats’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘統計’, // ラベル
      ‘href’ => home_url(‘/wp-admin/admin.php?page=stats’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-theme-editor’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘テーマの編集’, // ラベル
      ‘href’ => home_url(‘/wp-admin/theme-editor.php’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-widget’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘ウィジェット’, // ラベル
      ‘href’ => home_url(‘/wp-admin/widgets.php’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-nav-menus’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘メニュー’, // ラベル
      ‘href’ => home_url(‘/wp-admin/nav-menus.php’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-medias’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘メディア一覧’, // ラベル
      ‘href’ => home_url(‘/wp-admin/upload.php’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-plugins’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘プラグイン一覧’, // ラベル
      ‘href’ => home_url(‘/wp-admin/plugins.php’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-singles’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘投稿一覧’, // ラベル
      ‘href’ => home_url(‘/wp-admin/edit.php’) // ページURL
      ));
      $wp_admin_bar->add_menu(array(
      ‘parent’ => ‘dashboard_menu’, // 親メニューID
      ‘id’ => ‘dashboard_menu-pages’, // 子メニューID
      ‘meta’ => array(),
      ‘title’ => ‘固定ページ一覧’, // ラベル
      ‘href’ => home_url(‘/wp-admin/edit.php?post_type=page’) // ページURL
      ));
      }
      add_action(‘admin_bar_menu’, ‘customize_admin_bar_menu’, 100);

      //新着タイトル表示
      // (タクソノミーと)タームのリンクを取得する
      function custom_taxonomies_terms_links(){
      // その投稿から投稿タイプを取得
      $post_type = ‘works’;

      // その投稿タイプからタクソノミーを取得
      $taxonomies = get_object_taxonomies( $post_type, ‘objects’ );

      $out = array();
      foreach ( $taxonomies as $taxonomy_slug => $taxonomy ){

      // 投稿に付けられたタームを取得
      $terms = get_the_terms( $post->ID, $taxonomy_slug );

      if ( !empty( $terms ) ) {
      foreach ( $terms as $term ) {
      $out[0] = $term->name ;
      $out[] = ” ” ;
      }
      }
      }

      return implode(”, $out );
      }

      //OGP
      function mytheme_set() {
      add_theme_support( ‘title-tag’ );
      }
      add_action( ‘after_setup_theme’, ‘mytheme_set’ );

      add_shortcode(‘allpage_toc’, ‘get_allpage_toc’);
      function get_allpage_toc( $content ) {
      global $post;
      if (preg_match(‘$<!–nextpage–>$’, $post->post_content) && function_exists(‘toc_get_index’)) {
      $pages = explode(‘<!–nextpage–>’, $post->post_content);
      $toc = ”;
      foreach ($pages as $key => $page) {
      // 対象のページ番号
      $page_num = $key + 1;
      $page_content = toc_get_index($page);
      $page_permalink = get_permalink($post->ID);

      // ページ番号付加後のURL
      $page_permalink_paged = ”;
      if ($page_num == 1) {
      $page_permalink_paged = $page_permalink;
      } else {
      if (mb_substr($page_permalink, -1) == “/”) {
      $page_permalink_paged = $page_permalink . $page_num . ‘/’;
      } else {
      $page_permalink_paged = $page_permalink . ‘/’ . $page_num;
      }
      }

      $index = preg_replace( “!#!”, $page_permalink_paged . ‘#’, $page_content );

      if ($index != “”) {
      $class = “pageNo”;
      // 現在のページ番号
      $paged = (get_query_var(‘page’)) ? get_query_var(‘page’) : 1;
      if ($page_num == $paged) {
      $class .= ” currentpage”;
      $index = “<li class=’$class’>Page $page_num” . $index;
      } else {
      $index = “<li class=’$class’>Page $page_num” . $index;
      }
      }

      $toc .= $index;
      }

      global $tic;
      $toc_options = $tic->get_options();
      $style = ‘<style>div#toc_container:not(.paging_toc) {display: none !important}</style>’;
      $tic->enable();
      return $style . ‘<div id=”toc_container” class=”paging_toc”><p class=”toc_title paging_toc”>’. $toc_options[‘heading_text’] . ‘</p><ul class=”toc_list”>’.$toc .’</div><!–TOC–>’. $content;

      } else {
      return $content;
      }
      }

       

      body a:link, a:active {
      color: #3e62ad;
      }
      a:hover {
      color: #89c3eb;
      }
      a:visited {
      color: #069;
      }
      p {
      margin: 5px;
      padding: 5px;
      }
      li {
      font-size: 1em;

      }
      article#home-text{
      max-width:560px;
      }

      h5.ko_mi {
      position: relative;
      color: #333;
      text-shadow: 0 0 2px white;
      margin:10px auto;
      }
      h5.ko_mi:before {
      content: “”;
      position: absolute;
      background: #9de5ff;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      top: 50%;
      /* border: dashed 1px white; */
      left: -15px;
      -webkit-transform: translateY(-50%);
      transform: translateY(-50%);
      z-index: -1;
      }

      .top{
      text-align:center;
      }

      .wf-nicomoji { font-family: “Nico Moji”; }
      /*カウンターの配置*/
      ul.ko_list{
      max-width:500px;
      }
      ul.ko_list li{
      border-bottom:1px #000 solid;
      }
      ul.ko_list ol{
      border-bottom:2px #000 solid;
      }

      iframe {
      max-width: 125px;
      max-height: 30px;
      margin: 0;
      }

      .search-left{
      margin-bottom:10px;
      margin-right:8px;
      }
      @media only screen and (max-width: 1030px){
      .search-right{
      margin-bottom:10px;
      margin-left:-8px;
      }
      }
      @media only screen and (max-width: 768px){
      .search-right{
      margin-bottom:10px;
      margin-left:0;
      }
      }

      /*サイトロゴ説明メニュー*/

      .header #logo {
      font-family: ‘Slabo 27px’, serif;
      font-size: 2.5em;
      margin-top: 15px;
      }
      #inner-header .site-desc {
      margin: 0;
      padding: 0;
      color: #192f60;
      }
      #inner-header .widget-area {
      margin: 0;
      padding: 0;
      }
      #inner-header .textwidget p {
      margin: 0;
      padding: 0;
      text-align: right;
      }
      .header_content #logo {
      float: left;
      }
      .header_contents {
      text-align: right;
      height: 85px;
      margin-right: 10px;
      margin-top:20px;
      }
      /*HOMEへ戻るリンク*/
      .home_link {
      color:#1c305c;
      text-align:center;
      margin:0 auto 15px;
      max-height:0.9em;
      }
      @media only screen and (min-width: 768px){
      .home_link{
      display:none;
      }
      }

      /*スマホサイズはヘッター消す*/
      @media only screen and (max-width: 767px){
      .header{
      display:none;
      }
      }

      /*スマホサイズのみトップ画像*/

      img#top_img {
      max-width: 90vw;
      margin-bottom: 0;
      }

      /* 拍手の余白 */

      div.maroyaka-webclap, mwc-claping {
      margin: 10px 0 10px;
      }

      /*トップの更新履歴*/
      ul.update {
      border: solid 2px #c1e4e9;
      padding: 0.5em 1em 0.5em 1em;
      position: relative;
      margin-top: 2em;
      word-break:keep-all;
      max-width:80%;
      margin-right:auto;
      margin-left:auto;
      border-radius:0 5px 5px
      }
      ul.update li {
      line-height: 1.5;
      padding: 0.5em 0;
      list-style-type: none!important;
      }
      ul.update li:after {
      /*タブ*/
      background: #c1e4e9;
      color:#1c305c;
      font-family: “Font Awesome 5 Free”,’Avenir’,’Arial’,sans-serif;
      position: absolute;
      left: -2px;
      bottom: 100%;
      padding: 1px 7px;
      content: ‘更新履歴・お知らせ’;/*アイコンコード+文字*/
      letter-spacing: 0.05em;/*字間*/
      border-radius:5px 5px 0;
      }

      /*モバイル用TOPmenu*/

      div.update {
      margin: 0 auto;
      border-bottom: 2px solid #1c305c;
      width: 100px;
      }
      div.update a:link {
      color: #1c305c;
      }
      #menutop li {
      display: inline-block;
      border-radius:8px;
      }
      .menutop {
      padding: 10px;
      margin: 0 5px;
      background-color: #c1e4e9;
      min-width: 85px;
      }
      span.menutop a:link {
      color: #fff;
      }
      /*コピーライト余白*/
      @media only screen and (max-width: 768px){
      #inner-footer {
      margin-top:10px;
      margin-bottom:40px;
      max-width: 100%;
      }
      }
      /*トップナビゲーション装飾*/

      .nav.top-nav {
      border-top: 4px double #1e90ff;
      border-bottom: 1px solid #1e90ff;
      }
      ul.nav.top-nav li a{
      padding: 15px 10px;
      font-size:16px;
      text-align:center;
      min-width:95px;
      }
      #menu-item-97 a,#menu-item-309 a{
      min-width:75px;
      }
      #menu-item-2249 a,#menu-item-132 a{
      max-width:125px;
      }
      ul.sub-menu li a{
      border-bottom: 1px solid #1e90ff;
      max-width:120px;
      }
      .header .nav li a {
      color: #4c6cb3;
      }
      /*ページ下部の余白*/

      #inner-content {
      margin-bottom: 0;
      max-width:900px;
      }
      .sidebar {
      margin-top: 0;
      }
      article.type-page {
      margin-bottom: 20px;
      }
      section.entry-content {
      margin-bottom: 0;}
      /*トップへ戻る矢印*/

      #totop {
      margin-bottom: 55px;
      margin-right: 20px;
      }
      a#totop {
      background: #5383c3;
      width: 30px;
      height: 30px;
      border-radius:50px;
      }
      a#totop::before {
      top: 13px;
      }
      a#totop:hover::before {
      position: absolute;
      top: 13px;
      left: 0;
      right: 0;
      margin: auto;
      }
      /*フッターメニューリンク*/

      .fixed-bottom-menu-item a:link {
      color: #fff;
      }
      footer.footer #inner-footer ul li a {
      font-size: 14px;
      font-weight: 600;
      color: #3e62ad;
      padding: 5px 2px;
      }
      ul.footer-nav {
      display: 0;
      display: flex;
      }
      ul.footer-nav li {
      padding: 5px;
      text-align: center;
      min-width: 50px;
      display: inline-block;
      }
      /*更新履歴プルダウン*/

      .cat-select select {
      max-width: 300px;
      margin: 10px auto;
      }
      /*画像の余白*/

      .entry-content img {
      margin-bottom: 5px;
      }
      main#main {
      margin-bottom: 0 !important;
      margin-top: 0;
      }
      /*作品ページのカテゴリ*/

      span.category a {
      font-size: 1.3em;
      }
      footer.article-footer .day {
      color: #274a78;
      }
      span.category a:link, a:active {
      color: #274a78;
      }
      /*サムネイルの表示位置*/
      figure.eye-catch img {
      object-position:40% 24%;
      }
      .shortcode-illust img{
      object-position:40% 24%;
      }
      /*イラストページのボックス*/

      div.gallery {
      width: 100%;
      margin-top: 20px;
      display: 0;
      display: flex;
      }
      select.menu-gallery {
      font-size: 15px;
      width: 200px;
      margin:0 auto;
      }

      h3.mokuzi {
      position: relative;
      display: inline-block;
      padding: 0 55px;
      }

      h3.mokuzi:before, h3.mokuzi:after {
      content: ”;
      position: absolute;
      top: 50%;
      display: inline-block;
      width: 45px;
      height: 2px;
      border-top: solid 1px black;
      border-bottom: solid 1px black;
      }

      h3.mokuzi:before {
      left:0;
      }
      h3.mokuzi:after {
      right: 0;
      }

      /*説明欄の余白*/

      .easel_term_disc{
      width: 100%;
      margin: 0 0 20px;

      }
      .easel_term_disc_inner {
      border-bottom: 1px dashed #3e62ad;
      padding-bottom: 20px;
      max-width:900px !important;
      }
      /*イラスト小話の表示*/

      article.type-works, article.type-ss {
      max-width: 650px;
      margin: 0 auto;
      }
      /*ページタイトル装飾*/

      h1.page-title {
      position: relative;
      margin-bottom: 1em;
      color: #19448e;
      text-align: center;
      }
      h1.page-title:before {
      content: ”;
      position: absolute;
      bottom: -15px;
      display: inline-block;
      width: 60px;
      height: 5px;
      left: 50%;
      -webkit-transform: translateX(-50%);
      transform: translateX(-50%);
      background-color: #19448e;
      border-radius: 2px;
      }
      @media screen and (max-width:768px) {
      h1.page-title {
      font-size: 5vw;
      }
      }
      #post-96 {
      margin: 0 auto;
      padding: 15px;
      }
      .top-content {
      padding: 0;
      }
      /*トップ新着設定*/

      #news {
      line-height: 1.8em;
      margin-bottom: 30px;
      margin-left: 0;
      margin-top: 0;
      }
      .new-firstlove {
      background-color: #d3cfd9;
      }
      .new-atarayo {
      background-color: #e8d3c7;
      }
      .new-mybear {
      background-color: #fde8d0;
      }
      .new-afterdays {
      background-color: #bed3ca;
      }
      .new-short {
      background-color: #e49e61;
      }
      .new-short_novel {
      background-color: #badcad;
      }
      .new-medium {
      background-color: #e6cde3;
      }
      .new-series {
      background-color: #e6cde3;
      }
      .new-works {
      background-color: #d3ccd6;
      }
      .new-ss {
      background-color: #fddea5;
      }
      .news-list {
      margin-bottom: 8px;
      border-bottom: 1px dotted #ccc;
      }
      .news-data {
      width: 150px;
      text-align: center;
      font-size: 17px;
      font-weight: 500;
      display: inline-block;
      color: #666;
      margin-bottom: 5px;
      vertical-align:bottom;
      }
      .news-category {
      margin-bottom: 6px;
      margin-right: 10px;
      margin-left: 10px;
      font-size: 13px;
      display: inline-block;
      min-width: 100px;
      text-align: center;
      font-weight: 400;
      padding: 3px 10px;
      color: #583822;
      border-radius:10px;
      }
      .top-newmark{
      margin-right:8px;
      }
      .news-title {
      display: block;
      padding-left: 15px;
      padding-bottom: 5px;
      padding-top:5px;
      }
      .news-jump {
      text-align: right;
      margin-right: 10px;
      margin-bottom: 0;
      font-size: 17px;
      }
      @media screen and (max-width:768px) {
      .news-data {
      width: 150px;
      display: block;
      font-size:1.9vh;
      }
      .news-list {
      line-height: 1.5em;
      margin-left: 5px;
      }
      .news-title {
      font-size: 1.8vh;
      display:flex;
      }
      }
      /*HOMEトピックス装飾*/

      h4.topics {
      padding: 0.25em 0.5em;
      color: #1e50a2;
      background: transparent;
      border-left: solid 5px #1e50a2;
      }
      /*更新履歴の余白*/

      .type-post {
      margin: 20px auto;
      max-width: 500px;
      }
      h1.h2.entry-title {
      color: #1c305c;
      }
      /*Novelページ設定*/

      .article-header {
      text-align: center;
      }
      .new-mark {
      color: #a25768;
      }
      article.novel {
      max-width: 650px;
      margin: 10px auto;
      }
      /*タクソノミーページ送り*/

      .pagination {
      margin: 0 auto;
      text-align: center;
      }
      .pagination ul {
      margin: 8px auto;
      }
      /*ページ送りの囲み*/

      .pagination.single a[rel=prev], .pagination.single a[rel=next] {
      border: none;
      }
      /*ページ送り*/

      .pager {
      text-align: center;
      margin-bottom: 20px;
      max-width: 600px;
      }
      .pager a.page-numbers {
      padding: 4px 5px;
      display: inline-block;
      width: 35px;
      height: 35px;
      margin: 0 auto;
      text-decoration: none;
      background-color: #bce2e8;
      border-radius:10px;
      }
      .pager a.page-numbers:hover {
      padding: 4px 5px;
      display: inline-block;
      background-color: #4c6cb3;
      color: #fff;
      width: 35px;
      height: 35px;
      margin: 0 auto;
      border-radius:10px;
      text-decoration: none;
      }
      .pager .page-numbers.current {
      padding: 4px 5px;
      display: inline-block;
      width: 35px;
      height: 35px;
      margin: 0 auto;
      text-decoration: none;
      background-color: #e8ecef;
      border-radius:10px;
      }
      .pager a.page-numbers.next, .pager a.page-numbers.prev {
      margin: 0 auto;
      background-color: #fff;
      display: inline;
      border: none;
      }
      /*小説本文のタイトルと線*/

      h1.entry-title.single-title {
      font-size: 16px;
      line-height: 0.5em;
      font-weight: 600;
      color: #3e62ad;
      padding-bottom: 0.2em;
      margin-left:15px;
      word-break: keep-all;
      }
      header.article-header.entry-header {
      border-bottom: 1px solid #3e62ad;
      }
      @media screen and (max-width:768px) {
      header.article-header.entry-header h1 {
      line-height: 1.2em;
      font-size:2.5vh;
      }
      }
      /*吹き出しタイトル*/

      h2.serial_h2 {
      position: relative;
      padding: 0.6em;
      background: #a2d7dd;
      border-bottom: none;
      color: #274a78;
      margin-bottom: 30px;
      border-radius:8px;
      }
      h2.serial_h2:after {
      position: absolute;
      content: ”;
      top: 100%;
      left: 30px;
      border: 15px solid transparent;
      border-top: 15px solid #a2d7dd;
      width: 0;
      height: 0;
      }
      h2.series_h2 {
      position: relative;
      padding: 0.6em;
      background: #e0edff;
      border-bottom: none;
      color: #274a78;
      margin-bottom: 30px;
      border-radius:8px;
      }
      h2.series_h2:after {
      position: absolute;
      content: ”;
      top: 100%;
      left: 30px;
      border: 15px solid transparent;
      border-top: 15px solid #e0edff;
      width: 0;
      height: 0;
      }
      ul.series_h3 a{
      font-weight:600;
      }
      ul.series_h3 li {
      color: #2a4073;
      font-size: 17px;
      }
      ul.series_h3 li::before {
      font-family: “Font Awesome 5 Free”;
      content: “\f105″;
      font-weight: 900;
      margin-right: 5px;
      color: #006888;
      }
      ol, ul {
      padding: 0 5px;
      }
      /*吹き出しタイトルスマホ表示*/

      @media screen and (max-width:768px) {
      h2.series_h2 {
      font-size: 1.3em;
      }
      ul.series_h3 li {
      font-size:1.7vh;
      }
      .ac-box2 label {
      font-size: 1em;
      }
      }
      @media screen and (min-width:768px) {
      .archive-novel-link {
      display: none;
      }
      }
      /*アーカイブの説明文*/

      div.archive-text {
      margin: 5px;
      }
      /* 作品アーカイブタイトルリンク */

      .archive-link {
      font-size: 17px;
      text-align: right;
      margin: 0 0 0 auto;
      max-width: 650px;}
      .archive-nove-link {
      display:none;
      }
      .archive-footer-link {
      text-align: center;
      margin-top: 30px;
      margin-bottom:20px;
      text-align: center;
      }
      @media screen and (max-width:768px) {
      .archive-link {
      font-size:1.8kh;
      word-break: keep-all;
      }
      .archive-nove-link {
      font-size: 2.5vh;
      text-align: right;
      margin-bottom: 0;
      max-width: 98%;
      }
      .archive-footer-link {
      font-size: 2vh;
      }
      }

      /*アーカイブページ余白*/

      article.type-page {
      padding-bottom: 10px;
      }
      /*アーカイブページタイトル余白*/

      .hentry .article-header {
      padding-left: 1em;
      padding-bottom: 0.5em;
      padding-top: 0.5em;
      }
      .hentry.text {
      padding-bottom: 5px;
      }
      /*本文タイトル下余白*/

      .hentry .article-header {
      margin-bottom: 20px;
      }
      /*アーカイブページスタイル*/

      main.archive {
      margin: 10px 15px 45px;
      }
      @media screen and (max-width:768px) {
      main.archive {
      margin: 10px auto;
      }
      }
      /*アーカイブページタイトル*/

      h1.archive-title.h2 {
      color: #5383c3;
      font-size: 19px;
      text-align: left;
      margin: 20px 0 15px;
      border-bottom: solid 3px #cce4ff;
      position: relative;
      word-break: keep-all;
      }
      h1.archive-title.h2:after {
      position: absolute;
      content: ” “;
      display: block;
      border-bottom: solid 3px #5472cd;
      bottom: -3px;
      width: 20%;
      }

      @media screen and (max-width:768px) {
      h1.archive-title.h2 {
      font-size: 2vh;
      }
      header.article-header.entry-header h1 {
      font-size: 1.8vh;
      }
      .entry-content {
      font-size: 16px !important;
      }
      }
      .entry-content {
      font-size: 18px;
      }
      /*本文タイトル*/

      h3.short_title::before {
      font-family: “Font Awesome 5 Free”;
      font-weight: 900;
      content: “\f105”;
      margin-right: .3em;
      color: #6495ed;
      }
      h3.short_title a {
      display: inline;
      margin-right:5px;
      font-size: 18px;
      font-weight: 500;
      }
      @media screen and (max-width:600px) {
      h3.short_title a {
      font-size: 3.8vw; }
      }
      .text-wrap article a h3 {
      font-size: 3.8vh;
      }
      h3.short_title {
      margin-bottom: 0 !important;
      padding: 5px;
      }
      article h3 {
      margin: 0;
      }
      /*短編アーカイブ*/

      .type-short:not(:last-of-type), .text:not(:last-of-type),.type-ss:not(:last-of-type) {
      border-bottom: none;
      margin-top: 0;
      }
      header.article-short {
      padding: 5px 10px;
      }
      article.type-short,article.type-ss {
      padding-bottom: 0;
      margin-bottom: 0;
      }
      .first-post {
      text-align: center;
      font-size: 1.1em;
      }
      /*短編連作ページ*/

      ul.short_list {
      padding-left: 10px;
      }
      ul.short_list li {
      margin-bottom: 20px;
      font-size: 2vh;
      }
      ul.short_list li:before {
      font-family: “Font Awesome 5 Free”;
      font-weight: 900;
      content: “\f105”;
      margin-right: .3em;
      color: #6495ed;
      }
      .short_novel h2 {
      border-bottom: 1px solid #c0c6c9;
      padding-bottom: 10px;
      }
      /*アーカイブページリスト*/

      #term-list li {
      font-size: 17px;
      }
      #term-list ul {
      list-style: none outside;
      margin: 10px auto;
      padding: 10px;
      }
      #term-list li {
      padding: 0 12px;
      float: left;
      width: 165px;
      }
      .clear::after {
      clear: both;
      display: block;
      content: “”;
      height: 0;
      width: 0;
      }
      #term-list_short {
      margin-bottom: 45px;
      }
      #term-list_short li {
      font-size: 1.2em;
      }
      #term-list_short li::before {
      font-family: “Font Awesome 5 Free”;
      content: “\f105”;
      font-weight: 900;
      margin-right: 5px;
      color: #006888;
      }
      #text ::after {
      content: “”;
      }
      @media screen and (max-width:768px) {
      #term-list li {
      padding: 0 12px;
      float: left;
      width: 290px;
      }
      #term-list_short li {
      font-size: 1em;
      }
      }
      /*custom_catタクソノミーカスタム*/

      .text-wrap p.byline.vcard {
      display: none;
      }
      .excerpt {
      display: none;
      }
      .text {
      border-bottom: none;
      padding: 0;
      margin-bottom: 0;
      }
      .entry-content {
      padding-top: 0;
      }
      /*NOVELページリンク*/

      #menu-novel ul {
      list-style: none;
      padding: 5px;
      max-width: 100%;
      margin-left: auto;
      margin-right: auto;
      }
      #menu-novel li {
      padding: 0;
      float: left;
      width: 100px;
      font-size: 15px;
      }
      #menu-novel li::before {
      font-family: “Font Awesome 5 Free”;
      content: “\f518”;
      font-weight: 900;
      margin-right: 5px;
      color: #006888;
      }
      .clear::after {
      clear: both;
      display: block;
      content: “”;
      height: 0;
      width: 0;
      }
      .footer #inner-footer .copyright {
      text-align: center;
      color: #a0522d;
      }
      @media screen and (max-width:768px) {
      #menu-novel li {
      padding: 0;
      float: left;
      width: 98px;
      text-align: left;
      }
      }
      /* カスタムウィジェットのエリア*/

      .widget-area {
      margin: 20px;
      }
      /*追加ウィジェットの余白*/
      .widget-area {
      text-align: center;
      word-break: keep-all;
      }
      .area-title {
      color: #5383c3;
      margin-top: 10px;
      margin-bottom:15px;
      border-bottom:1px dashed #5383c3;
      text-align:center;
      font-family: ‘Yusei Magic’, sans-serif;
      }
      .post-date{
      margin-right:0;
      }
      @media screen and (max-width:768px) {
      .widget-area {
      text-align: center;
      margin: 0 auto;
      }
      h3.area-title{
      margin:20px auto 10px;
      max-width: 150px;
      }
      .widget-area ul{
      margin-top:5px;
      }
      }
      .widget-menutop {
      margin: 0 auto;
      }
      /* 作品ページのブクマ一覧 */

      .bookmark {
      text-align: center;
      margin-bottom: 5px;
      }
      @media screen and (min-width:768px) {
      .widget ul li {
      margin-bottom: 0;
      }
      }
      button {
      font-size: 12px;
      }
      /* しおり一覧の表示 */

      #notice {
      position: fixed;
      top: 245px;
      right: 40px;
      padding: 10px;
      color: #fff;
      background: #19448e;
      border-radius:15px;
      }
      @media screen and (max-width:767px) {
      #notice {
      top: 10px;
      right: 10px;
      }
      }
      #shiori_create{
      padding: 10px 15px;
      background: #f3f3f3;
      border-radius:10px;
      }
      .shiori{
      margin-top:15px;
      }
      #announce {
      padding: 15px;
      background:#f3f3f3;
      border-radius:15px;
      }
      #announce p {
      margin: 0;
      }

      /*リストの点を削除*/

      li {
      list-style: none;
      }
      .screen-reader-text {
      display: none;
      }
      /* 続きを読むを消す */

      .excerpt-read-more {
      display: none;
      }
      /*下部拍手*/
      div.maroyaka-webclap, mwc-claping {
      margin: 10px;
      display: inline-block;
      }
      /*いいねボタン*/
      #iine_wrap{
      height:50px;
      vertical-align:bottom;
      display:inline-flex;
      }

      /* 手動お気に入りボタン */

      .favorite-link {
      text-align: right;
      max-width: 650px;
      margin: 5px;
      }
      /*RSS表示*/

      .rss-date::before {
      content: “\A”;
      white-space: pre;
      }
      /*Resを読む表示*/

      .ac-box {
      width: auto;
      margin: 30px auto 5px;
      }
      .ac-box label {
      max-width: 120px;
      font-size: 16px;
      font-weight: 700;
      text-align: center;
      background: #89c3eb;
      margin: auto;
      line-height: 50px;
      position: relative;
      display: block;
      height: 50px;
      cursor: pointer;
      color: #fff;
      border-radius: 8px;
      }
      .ac-box label:hover {
      background: #c1e4e9;
      }
      .ac-box input {
      display: none;
      }
      .ac-box label:after {
      color: #fff;
      font-family: “Font Awesome 5 Free”;
      content: ” \f078″;
      }
      .ac-box input:checked~label::after {
      color: #fff;
      font-family: “Font Awesome 5 Free”;
      content: ” \f077″;
      }
      .ac-box input {
      display: none;
      }
      .ac-box div {
      height: 0;
      padding: 0;
      overflow: hidden;
      }
      .ac-box input:checked~div {
      height: auto;
      padding: 5px;
      background: #eee7e0;
      }
      .ac-box div p {
      color: #777;
      line-height: 23px;
      font-size: 16px;
      padding: 20px;
      text-align: justify;
      border-radius: 8px;
      }
      .ac-small p {
      margin-bottom: 0;
      }
      /**********************
      モーダルウィンドウ
      **********************/

      .modal-window {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 999;
      line-height: 1.3;
      display: none;
      }
      .modal-window:target {}
      .is-active.modal-window {
      display: block;
      }
      .modal-window:target {
      display: block;
      }
      .modal-window .modal-inner {
      position: absolute;
      top: 100px;
      left: 5%;
      z-index: 20;
      padding: 5%;
      margin: 0 auto;
      width: 80%;
      background: #fff;
      }
      .modal-window .modal-close {
      display: block;
      text-indent: -100px;
      overflow: hidden;
      }
      .modal-window .modal-close:before {
      content: ”;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 10;
      background: #333;
      }
      .modal-window .modal-close:after {
      content: ‘\00d7’;
      position: absolute;
      top: 70px;
      right: 15%;
      z-index: 20;
      margin: 0 auto;
      background: #fff;
      padding: 10px;
      text-decoration: none;
      text-indent: 0;
      }
      .modal-window {}
      /**********************
      スマホのフッターメニュー
      **********************/

      ul.footer_menu {
      margin: 0 auto;
      padding: 5px 0;
      width: 100%;
      overflow: hidden;
      display: table;
      table-layout: fixed;
      text-align: center;
      width: 100%;
      }
      ul.footer_menu li {
      margin: 0;
      padding: 0;
      display: table-cell;
      vertical-align: middle;
      list-style-type: none;
      font-size: 13px;
      line-height: 15px;
      }
      ul.footer_menu li a i {
      font-size: 24px;
      }
      ul.footer_menu li a {
      border: none;
      display: block;
      color: #fff;
      text-align: center;
      text-decoration: none;
      }
      .footer_menu {
      position: fixed;
      bottom: 0;
      left: 0;
      background: #89c3eb;
      z-index: 9999999999;
      }
      /**********************
      SNSの部分
      ***********************/

      .modal-window .modal-inner.sns {
      margin: 0 auto;
      text-align: center;
      }
      .modal-inner ul {
      list-style: none;
      }
      .modal-inner li {
      list-style: none;
      float: left;
      width: 25%;
      margin: 3%;
      }
      .modal-inner li a {
      font-size: 150%;
      position: relative;
      display: block;
      padding: 10px;
      color: #fff;
      text-align: center;
      text-decoration: none;
      }
      .modal-inner li a:hover {}
      .share li a {
      display: block;
      padding: 10px 5px;
      color: #fff;
      font-size: 14px;
      text-decoration: none;
      text-align: center;
      }
      .share li a:hover {
      color: #fff;
      }
      .share li a:visited {
      color: #fff;
      }
      .tweet a {
      background-color: #55acee;
      }
      .facebook a {
      background-color: #315096;
      }
      .googleplus a {
      background-color: #dd4b39;
      }
      .hatena a {
      background-color: #008fde;
      }
      .line a {
      background-color: #00c300;
      }
      .pocket a {
      background-color: #f03e51;
      }
      .rss a {
      background-color: #ff8c00;
      }
      .feedly a {
      background-color: #6cc655;
      }
      .share-sm {
      margin: 0;
      }
      .share-sm ul:after {
      content: “”;
      display: block;
      clear: both;
      }
      /**********************
      メニューの部分
      **********************/

      .mod li {
      float: none;
      display: block;
      width: 100%;
      margin: 0;
      }
      .mod li a {
      text-align: left;
      /* メニューを左寄せ */
      font-weight: 700;
      /* メニューを太字に */
      background: #5383c3;
      /* メニューの背景色 */
      margin: 2%;
      font-size: 14px;
      /* メニュー文字サイズ */
      }
      /*カテゴリーデザイン*/

      .widget_categories ul {
      margin: 0;
      padding: 0;
      list-style: none;
      }
      .widget_categories ul li {
      display: inline-block;
      margin: 0 .2em 0 0;
      padding: 0;
      }
      .widget_categories ul li a {
      position: relative;
      display: inline-block;
      max-width: 150px;
      height: 29px;
      line-height: 28px;
      padding: 0 4.2em 0 .6em;
      background-color: #fff;
      border: 1px solid #ccc;
      white-space: nowrap;
      overflow: hidden;
      color: #333;
      font-size: 9px;
      text-decoration: none;
      }
      .widget_categories li .cat_count {
      position: absolute;
      top: 5px;
      right: 5px;
      z-index: 2;
      width: 28px;
      height: 18px;
      line-height: 18px;
      background-color: #eee;
      color: #333;
      text-align: center;
      }
      .widget_categories ul li a:hover {
      background-color: #337ab7;
      border: 1px solid #337ab7;
      color: #fff;
      }
      .widget_categories ul li a:hover .cat_count {
      background-color: #fff;
      color: #337ab7;
      }
      /************************************
      ** 折り畳みアーカイブウィジェット
      ************************************/

      .widget_archive a.year {
      cursor: pointer;
      text-decoration: underline;
      }
      .widget_archive .years ul {
      margin: 0;
      margin-bottom: 1em;
      }
      #sidebar .widget_archive ul.years li {
      margin: 0;
      }
      .month li {
      display: inline-block;
      margin: 0;
      width: 80px;
      font-size:12px;
      }
      .month li a {
      font-size: 14px;
      margin: 0 5px;
      color: #333;
      }
      .widget_archive ul.years .hide {
      margin: 0;
      height: 0;
      visibility: hidden;
      }

    • #1181 返信
      gtgt
      キーマスター

      ご確認ありがとうございます。

      やはり、functions.phpに付け加えている内容が原因かと思われます。
      量が多いのですべてをチェックすることはできませんが、
      画像まわりの関数もいくつかオーバーロードしているようなので、そのあたりに起因しているのではないでしょうか。

      原因になっていそうな関数をひとつずつコメントアウトしてみて、症状が改善されるかどうか確認してみてください。
      症状が改善されたら、その関数に原因があるということになります。

      具体的な解決策を提案できず恐縮ですが、よろしくお願いいたします。

    • #1184 返信
      葉月
      ゲスト

      やはりfunctions.phpでしたか。
      ご助言通り画像関連をメインにしらみつぶしで確認してみようと思います。
      こちらが原因にもかかわらず、お忙しい中、確認してくださりありがとうございました!

4件の返信スレッドを表示中
返信先: 画像が表示されなくなったで#1176に返信
あなたの情報: