title: Adding Flexslider to a Wordpress Child Theme
body: <p>I want to add a flex slider to a Wordpress Child theme but it does not work. I have been trying for hours and would appreciate some help.
  Here is the site:
  <a href="http://dev.electricalenergy.se/" rel="nofollow">http://dev.electricalenergy.se/</a></p>
  
  <p>In my Child Theme, I have added:
  1. a CSS folder with flexslider.css
  2. a js folder with jquery.flexslider.js
  3. function.php with the following script</p>
  
  <pre><code>&lt;?php
  // FLEXSLIDER
  function flexslider() {
      if (!is_admin()) {
  
          // Enqueue FlexSlider JavaScript
          wp_register_script('jquery_flexslider', get_template_directory_uri(). '/js/jquery.flexslider-min.js', array('jquery') );
          wp_enqueue_script('jquery_flexslider');
  
          // Enqueue FlexSlider Stylesheet        
          wp_register_style( 'flexslider-style', get_template_directory_uri() . '/css/flexslider.css', 'all' );
          wp_enqueue_style( 'flexslider-style' );
  
          // FlexSlider custom settings       
          add_action('wp_footer', 'flexslider_settings');
  
          function flexslider_settings() { ?&gt;         
              &lt;script&gt;
                  jQuery(document).ready(function($){
  
                      $('.flexslider').flexslider();
                  });
              &lt;/script&gt;
          &lt;?php 
          }
      }
  }
  add_action('init', 'flexslider');
  </code></pre>
  
  <ol start="4">
  <li><p>at last, I duplicated index.php from the parent Theme and added</p>
  
  <pre><code>&lt;div id="primary" class="content-area"&gt;
  &lt;main id="main" class="site-main" role="main"&gt;
  
          &lt;!-- Flexslider demo content --&gt;
  
          &lt;div class="flexslider"&gt;
              &lt;ul class="slides"&gt;
                  &lt;li&gt;
                      &lt;img src="http://farm7.staticflickr.com/6213/6256961398_a484813abe_b.jpg" /&gt;
                      &lt;p class="flex-caption"&gt;Caption goes here&lt;/p&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;img src="http://farm7.staticflickr.com/6025/6012928351_d643e5a404_b.jpg" /&gt;
                      &lt;p class="flex-caption"&gt;Caption goes here&lt;/p&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;img src="http://farm7.staticflickr.com/6126/6007110789_bd7faaaa79_b.jpg" /&gt;
                      &lt;p class="flex-caption"&gt;Caption goes here&lt;/p&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;img src="http://farm6.staticflickr.com/5159/5874760659_de4c00d585_b.jpg" /&gt;
                      &lt;p class="flex-caption"&gt;Caption goes here&lt;/p&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
  
          &lt;!-- END Flexslider demo content --&gt;
  </code></pre></li>
  </ol>