As we are building a WordPress theme with Ext JS, we need to have Ext JS library installed in our theme's directory and also create a js
file where we will add all the Ext JS code we need. So let's go ahead and do it. Copy the Ext JS SDK into the ext-theme
folder and also create a new file called app.js
:
Now, inside the header.php
file add the following code:
<html> <head> <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title> // #1 <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/extjs/resources/css/ext-all.css" type="text/css"/> // #2 <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"/> // #3 <script src="<?php bloginfo('stylesheet_directory'); ?>/extjs/ext-all.js"></script> // #4 <script src="<?php bloginfo('stylesheet_directory'); ?>/app.js"></script> // #5 </head>