Title: editing header.php
Last modified: August 30, 2017

---

# editing header.php

 *  [niko30](https://wordpress.org/support/users/niko30/)
 * (@niko30)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/editing-header-php/)
 * i am trying to add some button to my header.php (or any php file) and have no
   effect.
    it worked before in my other site.
 * part of the code :
    ————————————————————————————- <?php do_action( ‘__before_header’);?
   >
 * <header class=”<?php echo implode( ” “, apply_filters(‘tc_header_classes’, array(‘
   tc-header’ ,’clearfix’, ‘row-fluid’) ) ) ?>” role=”banner”>
    <?php // The ‘__header’
   hook is used with the following callback functions (ordered by priorities) : //
   CZR_header_main::$instance->tc_logo_title_display(), CZR_header_main::$instance-
   >czr_fn_tagline_display(), CZR_header_main::$instance->czr_fn_navbar_display()
   do_action( ‘__header’ ); ?>
 * <div>test div</div>
    <p> <div id=”pbtn”>
 *  <button id=”btnsrc” class=”buttonmenu” >sss</button>
    <button id=”btn1″ class
   =”buttonmenu” onclick=”location.href=’#’;” >sss</button> <button id=”btn2″ class
   =”buttonmenu” onclick=”location.href=’#’;”>sss</button> <button id=”btn3″ class
   =”buttonmenu” onclick=”location.href=’#’;”>sss</button>
 * </div>
    </p>
 *  </header>
 *  <?php
    //This hook is used for the slider : CZR_slider::$instance->czr_fn_slider_display()
   do_action ( ‘__after_header’ ) ?>
 * ——————————————————————–
    i tried also in index.php and the same, no effect. i
   don’t have catch plugins the installation is clean. if i add a code before the
   <?php tag at the beginning of the page index or header.php i can see it in my
   site (only the code written above the <?php tag).
 * part of code:
    ———————————————————— <div>test div</div> <?php if ( apply_filters(‘
   czr_ms’, false ) ) { //in core init => add_action( ‘czr_ms_tmpl’, array( $this,‘
   czr_fn_load_modern_template_with_no_model’ ), 10 , 1 ); … —————————————————————————
   please help i be glad to hear some ideas. thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fediting-header-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Denzel Chia](https://wordpress.org/support/users/denzel_chia/)
 * (@denzel_chia)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/editing-header-php/#post-9456040)
 * Hi,
 * You should be using the action hook in header to add in your code ( using a child
   theme ) instead of editing header.php
 * You can use browser developer tools to locate the source code of your button,
   it could be hidden somewhere “behind” the header if you are using a sticky header.
 * You can either disable sticky header or use css code to change your button z-
   index position.
 * Thank you

Viewing 1 replies (of 1 total)

The topic ‘editing header.php’ is closed to new replies.

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

## Tags

 * [edit](https://wordpress.org/support/topic-tag/edit/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [Denzel Chia](https://wordpress.org/support/users/denzel_chia/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/editing-header-php/#post-9456040)
 * Status: not resolved