Title: child theme function.php override or remove parent theme function
Last modified: August 20, 2016

---

# child theme function.php override or remove parent theme function

 *  [Phil-ip](https://wordpress.org/support/users/phil-ip/)
 * (@phil-ip)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/child-theme-functionphp-override-or-remove-parent-theme-function/)
 * I have recently installed Reverie theme framework, which a versatile HTML5 Responsive
   WordPress Framework based on the Foundation framework.
 * Im trying to replace the following function (in reverie):
 *     ```
       function reverie_entry_meta() {
       	echo '<time class="updated" datetime="'. get_the_time('c') .'" pubdate>'. sprintf(__('Posted on %s at %s.', 'reverie'), get_the_time('l, F jS, Y'), get_the_time()) .'</time>';
       	echo '<p class="byline author vcard">'. __('Written by', 'reverie') .' <a href="'. get_author_posts_url(get_the_author_meta('ID')) .'" rel="author" class="fn">'. get_the_author() .'</a></p>';
       }
       ```
   
 * Using this function (in the child theme function.php)
 *     ```
       if (!function_exists('reverie_entry_meta')) {
       	function reverie_entry_meta() {
       		echo '<time class="updated" datetime="'. get_the_time('c') .'" pubdate>'. sprintf(__('%s at %s.', 'reverie'), get_the_time('l, F jS, Y'), get_the_time()) .'</time>';
       		echo '<p class="byline author vcard">'. __('Written by', 'reverie') .' <a href="'. get_author_posts_url(get_the_author_meta('id')) .'" rel="author" class="fn">'. get_the_author() .'</a></p>';
       	}
       }
       ```
   
 * This does not work. I could modify the parent function.php, but that defeats 
   the purpose of the reason for using a child theme – so that is not an option.
 * How do I get this to work?
    Thank you for your time and your help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [photocurio](https://wordpress.org/support/users/photocurio/)
 * (@photocurio)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/child-theme-functionphp-override-or-remove-parent-theme-function/#post-3428292)
 * The solution is not so hard. If the parent theme contains a function that begins
   with:
    `if (!function_exists('reverie_entry_meta')) {` then you simply add this:`
   function reverie_entry_meta() {};` to your child theme’s functions.php.
 *  Thread Starter [Phil-ip](https://wordpress.org/support/users/phil-ip/)
 * (@phil-ip)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/child-theme-functionphp-override-or-remove-parent-theme-function/#post-3428293)
 * Thank you photocurio!
    I guess that way of handling the parent function would
   be transferable to other child themes as well? Just to make sure that I understand
   the code, are you creating an empty function in the childthemes function.php?
 * Thank you for your time and help!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘child theme function.php override or remove parent theme function’ is
closed to new replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [function.php](https://wordpress.org/support/topic-tag/function-php/)
 * [remove function](https://wordpress.org/support/topic-tag/remove-function/)

 * 2 replies
 * 2 participants
 * Last reply from: [Phil-ip](https://wordpress.org/support/users/phil-ip/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/child-theme-functionphp-override-or-remove-parent-theme-function/#post-3428293)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
