Viewing 9 replies - 1 through 9 (of 9 total)
  • I am also looking for this solution…

    In child theme you need to include whole footer.php and change it or use proper function in functions.php.

    You can delete this code in footer.php
    <?php do_action( ‘spacious_footer_copyright’ ); ?>
    and you can see all the text in footer is disappeared.

    this is what I did, I created a new child theme, and created a blank “functions.php”, the following code is what i put in there.
    i remove the footer first, then add my own. the only place you need to replace is the “google.com” and the “anyName” areas. You can change the rest spacious or ThemeGrill words at your like. hope it helps!

    <?php
    
    /****************************************************************************************/
    
    /* Register shortcodes. */
    add_action( 'init', 'remove_copy' );
    
    function remove_copy(){
    
    	remove_action('spacious_footer_copyright', 'spacious_footer_copyright', 10);
    
    }
    
    add_action('spacious_footer_copyright', 'my_footer_info', 10);
    
    add_shortcode( 'cb-link', 'theme_link_shortcode' );
    
    function theme_link_shortcode() {
       return '<a href="'.esc_url( 'https://google.com' ).'" target="_blank" title="'.esc_attr__( 'ThemeGrill', 'spacious' ).'" ><span>'.__( 'anyName', 'childofSpacious') .'</span></a>';
    }
    
    function my_footer_info() {
    	$my_footer_info = '<div class="copyright">'.__( 'Copyright ? ', 'spacious' ).'[the-year] [site-link] '.__( 'Theme by: ', 'anyName' ).'[cb-link] '.'</div>';
    	echo do_shortcode( $my_footer_info );
    
    }
    
    ?>

    Thanks, @icatherine, for the copy/paste easiness. Worked like a charm.

    HI,

    @icatherine I did not arrive to this result.

    I delete from spacious theme the footer.php this code:

    <?php do_action( 'spacious_footer_copyright' ); ?>

    Then i create a new child theme add my style.css and the functions.php with the code you have but did not work.

    I need to add something in the footer.php of the spacious theme?

    Hi @diogoguilherme
    i think i should made it clear in the comment. I was just explaining my code in the function.php what each of them is.
    acutally you don’t need to delete <?php do_action( ‘spacious_footer_copyright’ ); ?>, just leave it there, and created function.php, paste my code. should work!

    another way is to go into inc/functions.php

    look for: function spacious_footer_copyright() {

    and edit it that way.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to change the footer’ is closed to new replies.