• I would like to know how to change the footer text for ample theme, I couldn’t find any specific line in footer.php file I could edit.
    It would be appreciated if someone can help out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • in a child theme’s functions.php, add for example this function with your adapted text:

    function ample_footer_copyright() {
       $site_link = '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" ><span>' . get_bloginfo( 'name', 'display' ) . '</span></a>';
    
       $wp_link = '<a href="' . 'https://www.ads-software.com' . '" target="_blank" title="' . esc_attr__( 'WordPress', 'ample' ) . '"><span>' . __( 'WordPress', 'ample' ) . '</span></a>';
    
       $tg_link =  '<a href="'. 'https://themegrill.com/themes/ample' .'" target="_blank" title="'.esc_attr__( 'ThemeGrill', 'ample' ).'" rel="designer"><span>'.__( 'ThemeGrill', 'ample') .'</span></a>';
    
       $default_footer_value = sprintf( __( 'Copyright &copy; %1$s %2$s.', 'ample' ), date( 'Y' ), $site_link ).' '.sprintf( __( 'Powered by %s.', 'ample' ), $wp_link ).' '.sprintf( __( 'Theme: %1$s by %2$s.', 'ample' ), 'Ample', $tg_link );
    
       $ample_footer_copyright = '<div class="copyright">'.$default_footer_value.'</div>';
       echo $ample_footer_copyright;
    }

    the above is a copy of the existing code for the footer output.

    what you change there will depend on what text you want to add or remove from the footer …

    for details, please ask in your theme’s forum at https://www.ads-software.com/support/theme/ample#postform

    The code in footer.php of the Ample Theme (the one that is provided here) is:

    <div class="copyright-info">
    <?php do_action( 'ample_footer_copyright' ); ?>
    </div>

    So it uses the function ‘ample_footer_copyright’

    That function is found in ample/inc/functions.php on line 116:

    add_action( 'ample_footer_copyright', 'ample_footer_copyright', 10 );
    /**
     * Function to show the footer info, copyright information
     */
    if ( ! function_exists( 'ample_footer_copyright' ) ) :
    function ample_footer_copyright() {
       $site_link = '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" ><span>' . get_bloginfo( 'name', 'display' ) . '</span></a>';
    
       $wp_link = '<a href="' . 'https://www.ads-software.com' . '" target="_blank" title="' . esc_attr__( 'WordPress', 'ample' ) . '"><span>' . __( 'WordPress', 'ample' ) . '</span></a>';
    
       $tg_link =  '<a href="'. 'https://themegrill.com/themes/ample' .'" target="_blank" title="'.esc_attr__( 'ThemeGrill', 'ample' ).'" rel="designer"><span>'.__( 'ThemeGrill', 'ample') .'</span></a>';
    
       $default_footer_value = sprintf( __( 'Copyright &copy; %1$s %2$s.', 'ample' ), date( 'Y' ), $site_link ).' '.sprintf( __( 'Powered by %s.', 'ample' ), $wp_link ).' '.sprintf( __( 'Theme: %1$s by %2$s.', 'ample' ), 'Ample', $tg_link );
    
       $ample_footer_copyright = '<div class="copyright">'.$default_footer_value.'</div>';
       echo $ample_footer_copyright;
    }
    endif;

    Your best bet is to discuss with Ample specifically how to override this in your Child Theme.

    That said, you can include footer.php in your Child Theme and edit to remove the theme copyright function and add your own or just use your own HTML.

    Thread Starter syumi

    (@syumi)

    Thanks you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Footer text change’ is closed to new replies.