Fatal error: Call to undefined function get_template_directory_url()

admin

Administrator
Staff member
I'm try convert my website to WordPress and WordPress gives me error in functions.php

error:

<blockquote>
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
</blockquote>

functions.php:

Code:
&lt;?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');
?&gt;