• Resolved beachsand14

    (@beachsand14)


    Hi

    I want to duplicate template-tags.php for my child theme to edit the footer copyright text. This page is is not an option in the “Files” tab. What should I do? My child theme is already setup.

    Alternatively, can I copy and paste the .php snippet from the template.tags.php (shown below) and paste it in footer.php, which I have a copy of in my child theme? Is this a bad practice?

    
    
    if ( ! function_exists( 'onepress_footer_site_info' ) ) {
        /**
         * Add Copyright and Credit text to footer
         * @since 1.1.3
         */
        function onepress_footer_site_info()
        {
            ?>
            <?php printf(esc_html__('Copyright %1$s %2$s %3$s', 'onepress'), '&copy;', esc_attr(date('Y')), esc_attr(get_bloginfo())); ?>
            <span class="sep"> &ndash; </span>
            <?php printf(esc_html__('%1$s theme by %2$s', 'onepress'), '<a href="' . esc_url('https://www.famethemes.com/themes/onepress', 'onepress') . '">OnePress</a>', 'FameThemes'); ?>
            <?php
        }
    }
    add_action( 'onepress_footer_site_info', 'onepress_footer_site_info' );
    
    /**

    Cheers
    Brody James

    • This topic was modified 7 years, 8 months ago by beachsand14.
    • This topic was modified 7 years, 8 months ago by beachsand14.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I duplicate template-tags.php?’ is closed to new replies.