Title: Customizing code from template-tags.php in child theme
Last modified: July 13, 2017

---

# Customizing code from template-tags.php in child theme

 *  Resolved [jeja7](https://wordpress.org/support/users/jeja7/)
 * (@jeja7)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/customizing-code-from-template-tags-php-in-child-theme/)
 * Hey!
 * Since I’m still learning, I would just like to check if I did this correctly…
   not to mess up the code.
 * So, I wanted to add a class to the „post-header-title“, which is in template-
   tags.php file.
    I copied to Bento child functions.php the entire code from the
   parent template-tags.php, starting with:
 * // Display post header
    if ( ! function_exists( ‘bento_post_header’ ) ) { ……
 * and added desired class there ( <div class=”post-header-title animated pulse”
   > ).
 * It worked.
    Is it the optimal, best way to customize stuff from template-tags.
   php? Or there is a better way to do it?
 * Thanks a lot!
 * P.S. Sorry… I’m aware that this kind of question is general one, not exclusively
   related to Bento theme.

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

 *  Theme Author [satoristudio](https://wordpress.org/support/users/satoristudio/)
 * (@satoristudio)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/customizing-code-from-template-tags-php-in-child-theme/#post-9316211)
 * Hey jeja7,
 * all functions in Bento’s template-tags.php file are designed to be [pluggable](https://codex.wordpress.org/Child_Themes#Using_functions.php)–
   i.e. they can be easily overridden by the child theme functions of the same name.
   Since the parent theme’s functions are already using if-conditionals when they
   are declared, you don’t need to use those in the child theme; your child theme’s
   function can thus look like this:
 *     ```
       function bento_post_header() {
          // function here
       }
       ```
   
 * Sincerely,
    Andrii / Satori Studio
 *  Thread Starter [jeja7](https://wordpress.org/support/users/jeja7/)
 * (@jeja7)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/customizing-code-from-template-tags-php-in-child-theme/#post-9316274)
 * Got it. Thanks!

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

The topic ‘Customizing code from template-tags.php in child theme’ is closed to 
new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/bento/2.5/screenshot.png)
 * Bento
 * [Support Threads](https://wordpress.org/support/theme/bento/)
 * [Active Topics](https://wordpress.org/support/theme/bento/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/bento/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/bento/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [jeja7](https://wordpress.org/support/users/jeja7/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/customizing-code-from-template-tags-php-in-child-theme/#post-9316274)
 * Status: resolved