Title: Insert code to header.php file
Last modified: August 22, 2016

---

# Insert code to header.php file

 *  Resolved [ursulica](https://wordpress.org/support/users/ursulica/)
 * (@ursulica)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/insert-code-to-headerphp-file/)
 * I have the Accelerate free Theme and I installed the Responsive Header Image 
   Slider plugin. I want to have the slideshow in the header.
    Please tell me where
   exactly to paste the code: <div class=headerslider …. in the header.php file.
   Thank you, Andrei
 * [https://wordpress.org/plugins/responsive-header-image-slider/](https://wordpress.org/plugins/responsive-header-image-slider/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [anoopranawat](https://wordpress.org/support/users/anoopranawat/)
 * (@anoopranawat)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/insert-code-to-headerphp-file/#post-5220351)
 * Hello,
 * Please open your header.php file and go to the </header> close tag and paste 
   the code
 * 1) if you want max-width:1100px slider
 *     ```
       <?php if(is_home()) { ?>
       	<div class="inner-wrap clearfix">
       	<div class="headerslider"> <?php echo do_shortcode('[sp_responsiveslider limit="-1"]'); ?></div>
       	</div>
       	<?php } ?>
       ```
   
 * 2) if you want full width slider
 *     ```
       <?php if(is_home()) { ?>
       	<div class="headerslider"> <?php echo do_shortcode('[sp_responsiveslider limit="-1"]'); ?>
       	</div>
       	<?php } ?>
       ```
   
 * **Here is the full code**
 *     ```
       <?php
       /**
        * Theme Header Section for our theme.
        *
        * Displays all of the <head> section and everything up till <div id="main" class="clearfix"> <div class="inner-wrap">
        *
        * @package ThemeGrill
        * @subpackage Accelerate
        * @since Accelerate 1.0
        */
       ?>
       <!DOCTYPE html>
       <html <?php language_attributes(); ?>>
       <head>
       <meta charset="<?php bloginfo( 'charset' ); ?>" />
       <meta name="viewport" content="width=device-width, initial-scale=1">
       <title>
       	<?php
       	/**
       	 * Print the <title> tag based on what is being viewed.
       	 */
       	wp_title( '|', true, 'right' );
       	?>
       </title>
       <link rel="profile" href="http://gmpg.org/xfn/11" />
       <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
       <?php
       /**
        * This hook is important for wordpress plugins and other many things
        */
       wp_head();
       ?>
       </head>
   
       <body <?php body_class(); ?>>
       <?php	do_action( 'accelerate_before' ); ?>
       <div id="page" class="hfeed site">
       	<?php do_action( 'accelerate_before_header' ); ?>
       	<header id="masthead" class="site-header clearfix">		
   
       		<div id="header-text-nav-container" class="clearfix">
   
       			<?php if( of_get_option( 'accelerate_header_image_position', 'position_two' ) == 'position_one' ) { accelerate_render_header_image(); } ?>
   
       			<div class="inner-wrap">
   
       				<div id="header-text-nav-wrap" class="clearfix">
       					<div id="header-left-section">
       						<?php
       						if( ( of_get_option( 'accelerate_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'accelerate_show_header_logo_text', 'text_only' ) == 'logo_only' ) && of_get_option( 'accelerate_header_logo_image', '' ) != '' ) {
       						?>
       							<div id="header-logo-image">
       								<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo of_get_option( 'accelerate_header_logo_image', '' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a>
       							</div><!-- #header-logo-image -->
       						<?php
       						}
   
       						if( of_get_option( 'accelerate_show_header_logo_text', 'text_only' ) == 'both' || of_get_option( 'accelerate_show_header_logo_text', 'text_only' ) == 'text_only' ) {
       						?>
       						<div id="header-text">
       							<h1 id="site-title">
       								<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
       							</h1>
       							<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2><!-- #site-description -->
       						</div><!-- #header-text -->
       						<?php
       						}
       						?>
       					</div><!-- #header-left-section -->
       					<div id="header-right-section">
       						<?php
       						if( is_active_sidebar( 'accelerate_header_sidebar' ) ) {
       						?>
       						<div id="header-right-sidebar" class="clearfix">
       						<?php
       							// Calling the header sidebar if it exists.
       							if ( !dynamic_sidebar( 'accelerate_header_sidebar' ) ):
       							endif;
       						?>
       						</div>
       						<?php
       						}
       						?>
       			    	</div><!-- #header-right-section --> 
   
       			   </div><!-- #header-text-nav-wrap -->
   
       			</div><!-- .inner-wrap -->
   
       			<?php if( of_get_option( 'accelerate_header_image_position', 'position_two' ) == 'position_two' ) { accelerate_render_header_image(); } ?>
   
       			<nav id="site-navigation" class="main-navigation inner-wrap clearfix" role="navigation">
       				<h1 class="menu-toggle"><?php _e( 'Menu', 'accelerate' ); ?></h1>
       				<?php
       					if ( has_nav_menu( 'primary' ) ) {
       						wp_nav_menu( array( 'theme_location' => 'primary' ) );
       					}
       					else {
       						wp_page_menu();
       					}
       				?>
       			</nav>
       		</div><!-- #header-text-nav-container -->
   
       		<?php if( of_get_option( 'accelerate_header_image_position', 'position_two' ) == 'position_three' ) { accelerate_render_header_image(); } ?>
   
       		<?php
          	if( of_get_option( 'accelerate_activate_slider', '0' ) == '1' ) {
       			if ( is_front_page() ) {
          			accelerate_featured_image_slider();
       			}
          	}
          	?>
   
       	</header>
       	<?php if(is_home()) { ?>
       	<div class="inner-wrap clearfix">
       	<div class="headerslider"> <?php echo do_shortcode('[sp_responsiveslider limit="-1"]'); ?></div>
       	</div>
       	<?php } ?>
       	<?php do_action( 'accelerate_after_header' ); ?>
       	<?php do_action( 'accelerate_before_main' ); ?>
       	<div id="main" class="clearfix">
       		<div class="inner-wrap clearfix">
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Insert code to header.php file’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/responsive-header-image-slider_7290a2.
   svg)
 * [WP Responsive header image slider](https://wordpress.org/plugins/responsive-header-image-slider/)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-header-image-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-header-image-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-header-image-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-header-image-slider/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [anoopranawat](https://wordpress.org/support/users/anoopranawat/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/insert-code-to-headerphp-file/#post-5220351)
 * Status: resolved