So I am using the theme of 'Mesmerize'
I have created a child theme but want to change some of the footer php within the child them so when there is a theme update the changes done reverse.
This is my Functions.php in my child theme \wp-content\themes\mesmerize-child
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:
if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( ) );
}
endif;
add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
And below is the code which I need to change but within the child theme. I am needing to change the 'Built with Wordpress' text which I have been able to do just not using the child theme This is the templates-functions.php located within \wp-content\themes\mesmerize\inc
//FOOTER FUNCTIONS
function mesmerize_get_footer_content($footer = null)
{
$template = apply_filters('mesmerize_footer', null);
if ( ! $template) {
$template = $footer;
}
get_template_part('template-parts/footer/footer', $template);
}
function mesmerize_get_footer_copyright()
{
$copyrightText = __('**Built using WordPress** and the <a target="_blank" href="%1$s" class="mesmerize-theme-link">Mesmerize Theme</a>', 'mesmerize');
$copyrightText = sprintf($copyrightText, 'http://extendthemes.com/mesmerize');
$copyright = '<p class="copyright">© ' . " " . date_i18n(__('Y', 'mesmerize')) . ' ' . esc_html(get_bloginfo('name')) . '. ' . wp_kses_post($copyrightText) . '</p>';
return apply_filters('mesmerize_get_footer_copyright', $copyright);
}
I have tried adding templates-functions.php to \wp-content\themes\mesmerize-child\inc with the changes but this did not work. I have looked through the code but can't seem to change this to get it to call the file from the child theme.
Also just for more information here is the footer.php file in the parent themes files.
<?php mesmerize_get_footer_content(); ?>
</div>
<?php wp_footer(); ?>
</body>
</html>
Please let me know if you need any more info and any help will be appreciated with what I need to be doing here
Thanks
UPDATE - I HAVE TRIED THE BELOW from it being suggested in comments. I am posting this code of what I have tried so I can get some help with this.
function change_copyrightText( $copyrightText ){
$copyrightText = __('Built using TEST and the <a target="_blank" href="%1$s" class="mesmerize-theme-link">TEST Theme</a>', 'mesmerize');
return $copyrightText;
}
add_filter('change_copyrightText', 'change_copyrightText', 10, 1);
mesmerize_get_footer_copyright
you can use that to Modify just the copyright textfunctions.php