• Resolved joshbuchea

    (@joshbuchea)


    Hi, what’s the best way to remove the “Storefront designed by WooThemes.” line from the footer?

Viewing 15 replies - 1 through 15 (of 50 total)
  • remove_action( 'storefront_footer', 'storefront_credit', 20 ); in your child themes functions.php file 🙂

    Thread Starter joshbuchea

    (@joshbuchea)

    Thanks. I tried that, and it didn’t seem to work though. Any ideas why?

    However, I was able to remove the “Storefront designed by WooThemes.” line from the footer by creating a child theme and overriding the storefront_credit() function in the child theme’s functions.php file. The original storefront_credit() function is in /storefront/inc/structure/footer.php.

    Hi,

    Since your child theme functions.php is loaded before the parent theme’s functions, you’ll need to load the remove_action on the “init” hook, which is loaded _after_ the parent function is loaded.

    Here is the code:

    add_action( 'init', 'custom_remove_footer_credit', 10 );
    
    function custom_remove_footer_credit () {
        remove_action( 'storefront_footer', 'storefront_credit', 20 );
    }
    Thread Starter joshbuchea

    (@joshbuchea)

    mjepson: Thanks for your response! I tried your code and while it does remove the “Designed by WooThemes” line in the footer, it also removes the Copyright line from the footer as well. So, if I wanted to use this solution and I still wanted the copyright line in the footer, I would need to make sure my child theme includes a footer.php file and I would need to add the copyright line to footer.php.

    While I believe I your solution is the “proper” way to remove this line from the credits, I was able to accomplish this by only modifying one file in my child theme by:

    Copying the original storefront_credit function from /storefront/inc/structure/footer.php into my child theme’s functions.php to override the storefront_credit function. Then, I simply removed all lines within <div class="siteinfo"> except for the Copyright line. The new storefront_credit function in my child theme’s functions.php is:

    function storefront_credit() {
    	?>
    	<div class="site-info">
    		&copy; <?php echo get_bloginfo( 'name' ) . ' ' . get_the_date( 'Y' ); ?>
    	</div><!-- .site-info -->
    	<?php
    }

    Hi,

    There is a better way to do this so you don’t have to edit any template files. It is best to leave all template files in parent theme, in case one of them gets updated in the future. If you have an old one in your child theme, you will continue to use the old template file instead of the newly updated one in the parent theme.

    Just add this to your functions.php in child theme:

    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
    }
    Thread Starter joshbuchea

    (@joshbuchea)

    I didn’t edit any template files, I simply pasted the following code into functions.php in my child theme:

    function storefront_credit() {
    	?>
    	<div class="site-info">
    		&copy; <?php echo get_bloginfo( 'name' ) . ' ' . get_the_date( 'Y' ); ?>
    	</div><!-- .site-info -->
    	<?php
    }

    Although my code is shorter and accomplishes removing the credits from the footer also, your code looks like the “proper” way to do it. Thank you for your response!

    Great Post Josh, worked awesome for me. Thank you! Now, where in this code do I insert my own site name with the &copy symbol? Messed around with this and page went blank. Figured I better ask before I really mess things up :0. Using storefront (woothemes) child theme.
    Thanking in advance.
    sk

    Thread Starter joshbuchea

    (@joshbuchea)

    Thanks. You should use mjepson’s code that includes the custom_storefront_credit() function, as his method is cleaner. The code will automatically pull your site name from WordPress, but if you wish to override that manually (not recommended), simply replace the following line:
    &copy; <?php echo get_bloginfo( 'name' ) . ' ' . get_the_date( 'Y' ); ?>
    with:
    &copy; YourWebsiteNameHere <?php echo get_the_date( 'Y' ); ?>

    Isn’t there a way to remove the footer text by editing the CSS file?

    You’re not really removing it with CSS. Technically you’re just hiding it from view. What we are discussing is how to remove it, and not even see it in the source.

    Oke, so if hiding it with CSS is enough for me. How would I do that? Hopefully someone knows what to hide. thanks

    frere, you can try this in your child style.css:

    footer .site-info { display:none; }

    Nice, that seems to work.
    thanks BuildMyWeb

    This is probably the wrong place to ask this question, but I’ll try.

    How do I change the color of the custom text in the footer widget area (using Kaboodle, which I love). I have tried the different styling options with no luck.

    Hi Wynne,

    This thread is closed already, and since Kaboodle is a paid WordPress theme, I suggest contacting WooThemes support directly for help.

Viewing 15 replies - 1 through 15 (of 50 total)
  • The topic ‘How to remove designed by WooThemes credits from footer?’ is closed to new replies.