milohuang / reverie

Reverie is a versatile HTML5 responsive WordPress framework based on ZURB's Foundation.
http://theakiba.com/reverie/
MIT License
916 stars 196 forks source link

Child theme, override reverie_entry_meta()? #3

Closed shrwnsan closed 12 years ago

shrwnsan commented 12 years ago

Hi there.

I'm trying to customize the display of reverie_entry_meta() HTML. I have the following in my child theme's functions.php file

add_action('init', 'remove_reverie_entry_meta'); 
add_action($tag, 'reverie_entry_meta');

//Remove the default Reverie entry-meta function
function remove_reverie_entry_meta() {
    remove_action($tag, 'reverie_entry_meta');
}
...

However, I am unsure what $tag should be in this case.

The other option which I'm trying to avoid is to directly edit the main reverie/functions.php file like so

if (!function_exists('reverie_entry_meta')) {
    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>';
    }
}

Please advise at your earliest convenience. Greatly appreciated. TIA

milohuang commented 12 years ago

Hello stechico, I am not a coder so I cannot provide any ideas on this topic, sorry for that. The point is, you can simply modify Reverie theme itself instead of creating a child theme. Which will save you a lot of time to remove some other features that I included.

shrwnsan commented 12 years ago

Hey Zhen. No worries. I'm on the same boat as you ^^

Like you said, it'll save time if I just hack away Reverie itself. But that's the road I'm trying to avoid; so that in case you update it in the future, the updates effect on a theme running on a production-stage wouldn't be negatively affected as much. I hope that make sense.

I have forked Reverie, and just modified functions.php like so in my above post. At least Reverie users may have the option to have more visual control over that part of their WP pages. For now that is, till we get more people that are backend development oriented and can provide a more efficient way in supporting this kind of subject.

I'll read over the Github doc to see how I can contribute with that minimal change, it's been a while. Thanks again for starting this theme project. It's pretty good from the ones I've checked out