• mysyfygalaxy.com

    (@mysyfygalaxycom)


    I am confused as to why nothing is working… I think something went wrong upon installation or something… hopefully someone can direct me to fix this issue… so, here it is.

    I have woocommerce the lastest as of November 14, 2015 and storefront which downloaded from off the site as well.. or linked from… (whatever it came from). I don’t have any messages in the footer.php or the functions.php that allows me to omit the “Power by woo themes”
    The functions.php said:

    functions.php ( PHP script text )

    <?php
    /**
    * storefront engine room
    *
    * @package storefront
    */

    /**
    * Initialize all the things.
    */
    require get_template_directory() . ‘/inc/init.php’;

    /**
    * Note: Do not add any custom code here. Please use a custom plugin so that your customizations aren’t lost during updates.
    * https://github.com/woothemes/theme-customisations
    */

    This is where support at woocommerce said to edit the message… unless I don’t understand what needs to be changed here… perhaps someone can advise me where and what needs to be changed.

    Please send me an email here: [email protected]

    Thanks!

    -David

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    It isn’t recommended to do modifications through Storefront theme’s functions.php file. You will lose them once you are updating when new version comes in the future.

    Do modifications in the child theme. Thus, you should need to create your Storefront child theme.

    Steps how to create Storefront child theme.

    1. Create a new folder in wp-content/themes directory. Name it as “storefront-child”
    2. Create style.css file in your “storefront-child”. Paste the following stylesheet header

    /*
     Theme Name:   Storefront Child
     Theme URI:    https://www.woothemes.com/storefront
     Description:  Storefront Child Theme
     Author:       WooThemes
     Author URI:   https://www.woothemes.com
     Template:     storefront
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     License URI:  https://www.gnu.org/licenses/gpl-2.0.html
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  storefront-child
    */

    3. Create functions.php file in your “storefront-child”. Keep it empty as follows at the moment

    <?php

    Activate Storefront child theme

    1. Login to your site admin area.
    2. Go to Appearance > Themes > Activate Storefront Child theme

    Start doing modification through child theme’s functions.php file

    1. Open storefront-child/functions.php file
    2. To change the footer message, you should need to override the parent’s functions. Paste the following code.

    function storefront_credit() {
    
      ?>
      <div class="site-info">
        <?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '? ' . get_bloginfo( 'name' ) . ' ' . date( 'Y' ) ) ); ?>
        <?php if ( apply_filters( 'storefront_credit_link', true ) ) { ?>
        <br />
    
        <!-- Your custom message goes here -->
    
        <?php } ?>
      </div><!-- .site-info -->
      <?php
    
    }

    3. Insert your custom message by replacing <!– Your custom message goes here –>
    4. You’re done

    I hope this reply helps.

    Thread Starter mysyfygalaxy.com

    (@mysyfygalaxycom)

    I created the php files as you said… and it fails.. error messages.

    Apparently if I keep just the text inside the edited footer.php I created I can add just text… nothing else can be modified.

    If you visit the site:
    https://mysyfygalaxy.com

    You will notice that only the text I typed inside the footer.php works… when I created the functions.php file and did as you instructed, I get a server error?

    Is it possible that the themes themselves aren’t working as they should be working? It seems that almost everything I try with this setup, things don’t go the way they are suppose to go?

    Please advise a suggestion?

    Hi,

    Could you please post the content of functions.php file of your child theme here? Let me inspect from there.

    xianxiao

    (@xianxiao)

    You get an error message because the format of the style sheet is correct but you have an empty functions.php in your child theme.

    You must first let WordPress know that you have a child theme. Put the following on top of the functions.php of your child theme:

    <?php
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // BEGIN ENQUEUE PARENT ACTION
    
    if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
        function chld_thm_cfg_parent_css() {
            wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css' );
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
    
    // END ENQUEUE PARENT ACTION

    The footer credit is not in footer.php. It’s a result of an action. You first need to remove_action and then add yours.

    Now to remove the credit and replace it with yours, put the following code in your functions.php below the code I posted above.

    /* Remove Woocommerce footer credit */
    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">
            &copy; <?php echo get_bloginfo( 'name' ) . ' ' . get_the_date( 'Y' ); ?>
        </div><!-- .site-info -->
    	<?php
    }
    nymark

    (@nymark)

    You’re the man – THANKS!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Woocommerce & storefront can change footer message: powered by Woothemes’ is closed to new replies.