Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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!

    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 );
    
    }
    
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)