get_template_directory_url() のところでエラーが起きているのは分かるのですが、どこをどのように直せばよいかわかりません。
エラー表示としましては、
【( ! ) Fatal error: Uncaught Error: Call to undefined function get_template_directory_url() in C:\Users\yu28m\Local Sites\video\app\public\wp-content\themes\yuta\index.php on line 14 ( ! ) Error: Call to undefined function get_template_directory_url() in C:\Users\yu28m\Local Sites\video\app\public\wp-content\themes\yuta\index.php on line 14 Call Stack #TimeMemoryFunctionLocation 10.0003394176{main}( )...\index.php:0 20.0013394376require( 'C:\Users\yu28m\Local Sites\video\app\public\wp-blog-header.php' )...\index.php:17 33.69994563376require_once( 'C:\Users\yu28m\Local Sites\video\app\public\wp-includes\template-loader.php' )...\wp-blog-header.php:19 43.72814606424include( 'C:\Users\yu28m\Local Sites\video\app\public\wp-content\themes\yuta\index.php' )...\template-loader.php:106
サイトに重大なエラーがありました。
WordPress でのデバッグをさらに詳しく見る。】
です。
php
1<!DOCTYPE html> 2<html lang="ja"> 3 4<head> 5 6 <meta charset="utf-8"> 7 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 8 <meta name="description" content=""> 9 <meta name="author" content=""> 10 11 <title>Clean Blog - Start Bootstrap Theme</title> 12 13 <!-- Bootstrap core CSS --> 14 <link href="<?php echo get_template_directory_url(); ?>/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> 15 16 <!-- Custom fonts for this template --> 17 <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> 18 <link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'> 19 <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> 20 21 <!-- Custom styles for this template --> 22 <link href="<?php echo get_template_directory_url(); ?>/css/clean-blog.min.css" rel="stylesheet"> 23 24 <?php wp_head(); ?> 25</head> 26 27<body> 28 29 <!-- Navigation --> 30 <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav"> 31 <div class="container"> 32 <a class="navbar-brand" href="index.html">Start Bootstrap</a> 33 <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> 34 Menu 35 <i class="fas fa-bars"></i> 36 </button> 37 <div class="collapse navbar-collapse" id="navbarResponsive"> 38 <ul class="navbar-nav ml-auto"> 39 <li class="nav-item"> 40 <a class="nav-link" href="index.html">Home</a> 41 </li> 42 <li class="nav-item"> 43 <a class="nav-link" href="about.html">About</a> 44 </li> 45 <li class="nav-item"> 46 <a class="nav-link" href="post.html">Sample Post</a> 47 </li> 48 <li class="nav-item"> 49 <a class="nav-link" href="contact.html">Contact</a> 50 </li> 51 </ul> 52 </div> 53 </div> 54 </nav> 55 56 <!-- Page Header --> 57 <header class="masthead" style="background-image: url('<?php echo get_template_directory_url(); ?>/img/home-bg.jpg')"> 58 <div class="overlay"></div> 59 <div class="container"> 60 <div class="row"> 61 <div class="col-lg-8 col-md-10 mx-auto"> 62 <div class="site-heading"> 63 <h1>Clean Blog</h1> 64 <span class="subheading">A Blog Theme by Start Bootstrap</span> 65 </div> 66 </div> 67 </div> 68 </div> 69 </header> 70 71 <!-- Main Content --> 72 <div class="container"> 73 <div class="row"> 74 <div class="col-lg-8 col-md-10 mx-auto"> 75 <?php the_post(); ?> 76 <div class="post-preview"> 77 <a href="post.html"> 78 <h2 class="post-title"> 79 <?php the_title(); ?> 80 </h2> 81 <h3 class="post-subtitle"> 82 <?php the_content(); ?> 83 </h3> 84 </a> 85 <p class="post-meta">Posted by 86 <?php the_author(); ?> 87 on <?php the_time("Y-m-d"); ?></p> 88 </div> 89 <hr> 90 <div class="post-preview"> 91 <a href="post.html"> 92 <h2 class="post-title"> 93 I believe every human has a finite number of heartbeats. I don't intend to waste any of mine. 94 </h2> 95 </a> 96 <p class="post-meta">Posted by 97 <a href="#">Start Bootstrap</a> 98 on September 18, 2019</p> 99 </div> 100 <hr> 101 <div class="post-preview"> 102 <a href="post.html"> 103 <h2 class="post-title"> 104 Science has not yet mastered prophecy 105 </h2> 106 <h3 class="post-subtitle"> 107 We predict too much for the next year and yet far too little for the next ten. 108 </h3> 109 </a> 110 <p class="post-meta">Posted by 111 <a href="#">Start Bootstrap</a> 112 on August 24, 2019</p> 113 </div> 114 <hr> 115 <div class="post-preview"> 116 <a href="post.html"> 117 <h2 class="post-title"> 118 Failure is not an option 119 </h2> 120 <h3 class="post-subtitle"> 121 Many say exploration is part of our destiny, but it’s actually our duty to future generations. 122 </h3> 123 </a> 124 <p class="post-meta">Posted by 125 <a href="#">Start Bootstrap</a> 126 on July 8, 2019</p> 127 </div> 128 <hr> 129 <!-- Pager --> 130 <div class="clearfix"> 131 <a class="btn btn-primary float-right" href="#">Older Posts →</a> 132 </div> 133 </div> 134 </div> 135 </div> 136 137 <hr> 138 139 <!-- Footer --> 140 <footer> 141 <div class="container"> 142 <div class="row"> 143 <div class="col-lg-8 col-md-10 mx-auto"> 144 <ul class="list-inline text-center"> 145 <li class="list-inline-item"> 146 <a href="#"> 147 <span class="fa-stack fa-lg"> 148 <i class="fas fa-circle fa-stack-2x"></i> 149 <i class="fab fa-twitter fa-stack-1x fa-inverse"></i> 150 </span> 151 </a> 152 </li> 153 <li class="list-inline-item"> 154 <a href="#"> 155 <span class="fa-stack fa-lg"> 156 <i class="fas fa-circle fa-stack-2x"></i> 157 <i class="fab fa-facebook-f fa-stack-1x fa-inverse"></i> 158 </span> 159 </a> 160 </li> 161 <li class="list-inline-item"> 162 <a href="#"> 163 <span class="fa-stack fa-lg"> 164 <i class="fas fa-circle fa-stack-2x"></i> 165 <i class="fab fa-github fa-stack-1x fa-inverse"></i> 166 </span> 167 </a> 168 </li> 169 </ul> 170 <p class="copyright text-muted">Copyright © Your Website 2019</p> 171 </div> 172 </div> 173 </div> 174 </footer> 175 176 <!-- Bootstrap core JavaScript --> 177 <script src="<?php echo get_template_directory_url(); ?>/vendor/jquery/jquery.min.js"></script> 178 <script src="<?php echo get_template_directory_url(); ?>/vendor/bootstrap/js/bootstrap.bundle.min.js"></script> 179 180 <!-- Custom scripts for this template --> 181 <script src="<?php echo get_template_directory_url(); ?>/js/clean-blog.min.js"></script> 182 183 <?php wp_footer(); ?> 184</body> 185 186</html>
どなたか回答していただければ幸いです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/04/04 07:12