badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Reply To: Getting rid of Theme by: Theme Horse Powered by: WordPress

#17243
Wolf
Participant

Here is what I did after I failed in overruling the inc/structure/footer-extensions.php with my child theme (for whatever reason):

(1) Copy footer.php and footer-extensions.php to child theme folder

(2) Edit footer.php line 42ff.: require or include (doesn’t really matter) the extensions and rename the action:

<footer id="colophon" class="clearfix">
  <?php
  require('footer-extensions.php');
		      do_action( 'interface-child_footer' );
		   ?>
</footer>

(3) Edit footer-extensions.php: rename all functions (to avoid “cannot redeclare” errors), make your adjustments and adjust all add_action statements to the new action name from above (‘interface-child_footer’) – my footer-extensions.php looks like this now (for sure some bits could be deleted and finetuned, but this seems to work for the time being):

<?php
/**
 * Adds footer structures.
 *
 * @package 		Theme Horse
 * @subpackage 		Interface
 * @since 			Interface 1.0
 * @license 		http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
 * @link 			https://www.themehorse.com/themes/interface
 */

/****************************************************************************************/
global $interface_theme_setting_value;
		$options = $interface_theme_setting_value;
add_action( 'interface-child_footer', 'interface_child_footer_widget_area', 5 );
/** 
 * Displays the footer widgets
 */
function interface_child_footer_widget_area() {
	get_sidebar( 'footer' );
}
/****************************************************************************************/
if ((1 != $options['disable_bottom']) && (!empty($options['social_phone'] ) || !empty($options['social_email'] ) || !empty($options['social_location']))) {
add_action( 'interface-child_footer', 'interface_footer_infoblog', 10 );
/**
 * Opens the footer infobox
 */
/****************************************************************************************/
add_action( 'interface-child_footer', 'interface_child_footer_div_close', 15 );
/**
 * Close the previous div.
 */
function interface_child_footer_div_close() {
	echo '</div> <!-- .container -->
	</div> <!-- .info-bar -->';
	} 
}
/****************************************************************************************/
add_action( 'interface-child_footer', 'interface_child_open_sitegenerator_div', 20 );
/**
 * Opens the site generator div.
 */
function interface_child_open_sitegenerator_div() {
	echo '
	<div id="site-generator">
				<div class="container clearfix">';
}
/****************************************************************************************/
add_action( 'interface-child_footer', 'interface_socialnetworks', 25 );
/****************************************************************************************/
add_action( 'interface-child_footer', 'interface_child_footer_info', 30 );
/**
 * function to show the footer info, copyright information
 */
function interface_child_footer_info() {         
   $output = '<div class="copyright">'.__( 'Copyright &copy;', 'interface' ).' '.'[the-year] [site-link]'.'<br>'.__( 'Theme by:', 'interface' ).' '.'[th-link]'.'</div><!-- .copyright -->';
   echo do_shortcode( $output );
}
/****************************************************************************************/
add_action( 'interface-child_footer', 'interface_child_close_sitegenerator_div', 35 );
/**
 * Close the sitegenerator div.
 */
function interface_child_close_sitegenerator_div() {
echo '</div><!-- .container -->	
			</div><!-- #site-generator -->';
}
/****************************************************************************************/
add_action( 'interface-child_footer', 'interface_child_backtotop_html', 40 );
/**
 * Shows the back to top icon to go to top.
 */
function interface_child_backtotop_html() {
	echo '<div class="back-to-top"><a href="#branding">'.__( ' ', 'interface' ).'</a></div>';
}
?>