0

I have been spending days looking into edit my theme. I understand that in order to edit the footer of my parent theme i would need to create a child theme.

So here is my child theme folder on the same level as my other themes.

mythemefolder

As you can see I have my coeur-child folder created.

Here is the files under that folder

child theme files

Here is what contains in my style.css of the child theme

 themes/coeur-child/style.css
 /*
 Theme Name:   Coeur
 Theme URI:    http://frenchtastic.eu/theme/coeur
 Description:  Coeur Child Theme
 Author:       frenchtastic
 Author URI:   http://frenchtastic.eu/about
 Template:     Coeur
 Version:      3.1.4
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl.html
 Tags:         blog, e-commerce, one-column, two-columns, left-sidebar,       right-sidebar, custom-colors, editor-style, microformats, custom-  background, custom-menu, featured-images, post-formats, sticky-post, theme-options, threaded-comments, translation-ready 
Text Domain:  Coeur-child
*/

In my themes/coeur-child/functions.php

     <?php
     function my_theme_enqueue_styles() {

    $parent_style = 'coeur-style'; // Coeur This is 'coeur-style' for the Twenty Fifteen theme.

      wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
      wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style ),
        wp_get_theme()->get('Version')
       );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
  ?>

I copied the footer from my parent theme into my child theme folder

 <!-- <button class="mobileCart">
    <i class="fa fa-shopping-cart"></i>
   </button> -->

   <footer>
        <?php if(is_active_sidebar('footer-1') or is_active_sidebar('footer-2') or is_active_sidebar('footer-3')): ?>
       <div class="footer-top">
           <div class="container">
              <div class="row">
                  <div class="col-sm-4">
                      <?php dynamic_sidebar( 'footer-1' ); ?>
                  </div>
                  <div class="col-sm-4 md-footer-cl">
                    <?php dynamic_sidebar( 'footer-2' ); ?>
                  </div>
                  <div class="col-sm-4">
                      <?php dynamic_sidebar( 'footer-3' ); ?>
                  </div>
                </div>
           </div>
      </div>
     <div class="blog-footer blog-footer-widgets">
        <div class="container">
            <p class="site-credits">&copy; <?php echo date('Y'); ?> </p>
            <p class="back-to-top"><a href="#"><i class="fa fa-angle-up">      </i> <?php echo __('Back to top', 'coeur'); ?><a></p>
        </div>
      </div>
       <?php else: ?>
      <div class="blog-footer">
        <div class="container">
            <p class="site-credits">&copy; <?php echo date('Y'); ?> - </p>
            <p class="back-to-top"><a href="#"><i class="fa fa-angle-up"> </i> <?php echo __('Back to top', 'coeur'); ?><a></p>
        </div>
    </div>
      <?php endif; ?>
  </footer>

   </div> <!-- end of wrap -->

   <?php wp_footer(); ?>
   </body>
   </html>

got the following error

  Broken Themes

  The following themes are installed but incomplete.

  Name  Description     
  Coeur The parent theme is missing. Please install the "Coeur" parent       theme. Delete  Install Parent Theme

I am using WordPress version 4.8 & WooCommerce version 3.1.0

I searched for wp_enqueue_style in my parent coeur folder but child is not getting my coeur-style.

can somebody tell me what I am doing wrong?

  • coeur or Coeur? recheck template name. – Arsalan Mithani Jul 19 '17 at 11:35
1

make sure template name is correct.

Template – the name of the parent theme directory. The parent theme in your example is the Coeur theme, so the Template will be coeur

also make change theme name. for more information Click Here

| improve this answer | |
  • Thank you. So likewise, the 'Author: John Doe' and 'Author URI: example.com' Should be changed accordingly. Thank you. – evepokua Jul 19 '17 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.