WordPress: Get Child Theme Directory Path

Until now, there is no legitimate code to get WordPress child theme directory path. But, maybe this code would help you to do that.

define('child_template_directory', dirname( get_bloginfo('stylesheet_url')) );

// register the javascript
function umrah_js() {
wp_register_script( 'jquery-textualizer', child_template_directory . '/js/textualizer.min.js', array('jquery'),'', true);

wp_enqueue_script( 'jquery-textualizer' );
}
add_action( 'wp_enqueue_scripts', 'umrah_js' );

I hope this could help, since this help me too. 😀

 

source: eric p

Artikel terkait:   How to Find CMS and What Wordpress Theme on Site

Isi Komentar

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

This site uses Akismet to reduce spam. Learn how your comment data is processed.