• Resolved Tankman15

    (@tankman15)


    Hi,

    I am having a small problem with implementing a child theme. I have a test server which has WordPress and Woocommerce installed. I installed storefront theme and I created all my pages. I customised the theme but I couldn’t do all the customisation I wanted so I created a child theme. i followed this: https://codex.www.ads-software.com/Child_Themes

    This is my functions.php:
    ‘<?php

    // Import Storefront Styles
    add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ );
    function enqueue_parent_theme_style() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
    }

    // Remove WooThemes Credit from Footer
    add_action( ‘init’, ‘custom_remove_footer_credit’, 10 );
    function custom_remove_footer_credit () {
    remove_action( ‘storefront_footer’, ‘storefront_credit’, 20 );
    add_action( ‘storefront_footer’, ‘custom_storefront_credit’, 20 );
    }
    function custom_storefront_credit() {
    ?>
    <div class=”site-info”>
    ? <?php echo get_bloginfo( ‘name’ ) . ‘ ‘ . get_the_date( ‘Y’ ); ?>
    </div><!– .site-info –>
    <?php
    }

    // Remove search bar from the header.
    add_action( ‘init’, ‘jk_remove_storefront_header_search’ );
    function jk_remove_storefront_header_search() {
    remove_action( ‘storefront_header’, ‘storefront_product_search’, 40 );
    }
    ?>/’

    and this is my style.css:
    ‘/*
    Theme Name: Storefront-Child
    Description: This is my personal CSS file
    Version: 1.0.0 Alpha release
    Author: Tankman15
    Parent: storefront
    */

    /* Remove the site name from the header.
    ————————————————————– */
    .site-branding h1, .site-branding .site-description {
    visibility: hidden; display: none;
    }

    /* Set the global font to used (Tahoma).
    ————————————————————– */
    html * {
    font-family: Tahoma, Geneva, sans-serif;!important
    }

    /* Set the global headings.
    ————————————————————– */
    h1 {
    text-transform: capitalize;
    text-align: center;
    }
    h2 {text-transform: capitalize;}
    h3 {text-transform: capitalize;}

    /* Set footer text.
    ————————————————————– */
    .widget-area .widget {
    color: red;
    font-size: 10px;
    }’

    I have read that I need to add: @import url(“../storefront/style.css”); to my style.css but I have also read that this is no longer needed. I have tried to add it and it made no difference.

    I also tried to copy the index.php from storefront and place it within my child theme (storefront-child.zip). It didn’t make a difference.

    What have I missed or missing?

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘storefront child missing index.php’ is closed to new replies.