子テーマになければ 親テーマ を探す

<?php elseif ($page_make_choice == 'インクルードURL'): //include_pas版
    
    //echo $field['include_pas']
    
    ?>

   <?php //202509 子テーマになければ 親テーマを探す

    $choice_url = get_stylesheet_directory(). $field['include_pas']; //子テーマURL ?>
        <?php if (file_exists($choice_url)): //あるか??>

         <?php include $choice_url ;  ?>
         

    <?php else: // なければ?>

         <?php $choice_url = get_template_directory(). $field['include_pas']; //親テーマURL ?>
        <?php if (file_exists($choice_url)): //あるか??>

  <?php include $choice_url ;  ?>

     <?php endif; //END 親テーマURLあれば ?>

<?php endif; //子テーマになければ 親テーマを探す?>
<?php elseif($con_choice == 'con_include'):  //con_include_pas版 ?>

   <?php //202509 子テーマになければ 親テーマを探す

    $choice_url = get_stylesheet_directory(). $field['con_include_pas']; //子テーマURL ?>
        <?php if (file_exists($choice_url)): //あるか??>

         <?php include $choice_url ;  ?>
         

    <?php else: // なければ?>

         <?php $choice_url = get_template_directory(). $field['con_include_pas']; //親テーマURL ?>
        <?php if (file_exists($choice_url)): //あるか??>

  <?php include $choice_url ;  ?>

     <?php endif; //END 親テーマURLあれば ?>

<?php endif; //子テーマになければ 親テーマを探す?>
   <?php //子テーマにd_1_init.cssあれば 202509 FULL

   $css_url = get_stylesheet_directory()."/d_1_init.css";  ?>
    <?php if (file_exists($css_url)):?>
     <link href="<?php echo get_stylesheet_directory_uri(); ?>/d_1_init.css?<?php echo filemtime( get_stylesheet_directory()."/d_1_init.css"); ?>" rel="stylesheet" type="text/css" />

<?php else: // なければ親テーマ読み込む?>

    <link href="<?php echo get_template_directory_uri(); ?>/d_1_init.css?<?php echo filemtime( get_template_directory()."/d_1_init.css"); ?>" rel="stylesheet" type="text/css" />

 <?php endif; //END d_1_init.cssあれば 202509 FULL?>