2017-08-02 111 views
0

我試着將我的網站WordPress的和WordPress給我錯誤的functions.php致命錯誤:調用未定義功能get_template_directory_url()

錯誤:

Fatal error: Call to undefined function get_template_directory_url() in C:\wamp\www\wordpress\wp-content\themes\ilai-portfolio\functions.php on line 3

的functions.php:

<?php 
function ibsp_theme_style() { 
    wp_enqueue_style('bootstrap_css', get_template_directory_url() . '/bootstrap/css/bootstrap.min.css', array('ilai-portfolio-style'), '20132553'); 
    wp_enqueue_style('style_css', get_template_directory_url() . '/style.css', array('ilai-portfolio-style'), '20132553'); 
    wp_enqueue_style('fontawesome_css', get_template_directory_url(). '/fonts/font-awesome.min.css', array('ilai-portfolio-style'), '20132553'); 
    wp_enqueue_style('prettyfooter_css' , get_template_directory_url() . '/css/Pretty-Footer.css', array('ilai-portfolio-style'), '20132553'); 
} 

add_action('wp_enqueue_scripts', 'ibsp_theme_style'); 

function ibsp_theme_js() { 
    wp_enqueue_scripts('bootstrap_js', get_template_directory_url() . 'bootstrap/js/bootstrap.min.js', array('jquery'), '', true); 
    wp_enqueue_scripts('smoothscroll_js', get_template_directory_url() . 'js/smoothscroll.js', array('jquery'), '', true); 
} 

add_action('wp_enqueue_scripts', 'ibsp_theme_js'); 
?> 
+0

原始的功能是'get_template_directory_uri()''不get_template_directory_url()'等等。 –

回答

0

你在你的函數有一個錯字

正確的功能是: 個get_template_directory_uri()

更改 「_url()」 到 「_uri()」

+0

現在它給我兩個致命錯誤: 錯誤1: 致命錯誤:達到'256'的最大功能嵌套級別,放棄!在線33上的C:\ wamp \ www \ wordpress \ wp-includes \ option.php中 錯誤2: 致命錯誤:達到'在第0行的未知中 –

相關問題