child theme function.php 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)
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.