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: Making a Child for Function.php Error

#41327

Hi pentalogia,

If there is a function used previously in parent theme then you cannot redeclare the same function name on your child theme. To make a work first unhook the functions (original) and then only customize the code in your functions.php. You can view this below link how to unhook the functions.
Below is just an example to unhook page 404.php . paste below code under funtions.php and it will overwrite page 404.php. Similarly you can do this for other functions too.

unhook functions

// Unhook default Thematic functions
function unhook_thematic_functions() {
    // Don't forget the position number if the original function has one

remove_action( ‘interface_404_content', ‘interface_display_404_page_content', 10 );

}
add_action('init','unhook_thematic_functions'); // removes the header content by using hook interface_header

add_action( ‘interface_404_content', ‘interface_child_display_404_page_content', 10 );
 
 
function interface_child_display_404_page_content() {      ?>   
<div id="content">
		<header class="entry-header">
			<h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', ‘interface’ ); ?></h1>
		</header>
		<div class="entry-content clearfix" >
			<p>Thank you</p> 
		</div><!-- .entry-content -->
	</div><!-- #content -->
  <?php 
}

Thank you!