• Hello,
    I’m trying to use the plugin with Alizee free theme.
    I’ve correctly installed the plugin following the instructions and all seems working (settings page, adding images etc…), then I’ve copied the code and pasted in the header.php file as described (I’ve also read another post about the right position of the code and tried to follow the instructions) but it doens’t work.
    Could you please let me know where exactly I have to paste the code?
    Following the entire header.php file for you to check:

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package Alizee
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <?php if ( get_theme_mod('site_favicon') ) : ?>
    	<link rel="shortcut icon" href="<?php echo esc_url(get_theme_mod('site_favicon')); ?>" />
    <?php endif; ?>
    
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'alizee' ); ?></a>
    <?php if ( get_header_image() ) :?>
    	<header id="masthead" class="site-header has-banner" role="banner">
    <?php else : ?>
    	<header id="masthead" class="site-header" role="banner">
    <?php endif; ?>
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<div class="container">
    				<button class="menu-toggle btn"><i class="fa fa-bars"></i></button>
    				<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    			</div>
    		</nav><!-- #site-navigation -->
    		<div class="container">
    			<div class="site-branding">
    				<?php if ( get_theme_mod('site_logo') ) : ?>
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a>
    				<?php else : ?>
    					<?php if ( display_header_text() ) : ?>
    						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    						<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    					<?php endif; ?>
    				<?php endif; ?>
    			</div>
    		</div>
    	<?php if ( is_home() ) : ?>
    		<div class="sidebar-toggle"><i class="fa fa-plus"></i></div>
    	<?php endif; ?>
    	<?php if ( has_nav_menu( 'social' ) ) : ?>
    		<nav class="social-navigation clearfix">
    			<?php wp_nav_menu( array( 'theme_location' => 'social', 'link_before' => '<span class="screen-reader-text">', 'link_after' => '</span>', 'container_class' => 'container', 'menu_class' => 'menu clearfix', 'fallback_cb' => false ) ); ?>
    		</nav>
    		<div class="social-toggle"><i class="fa fa-facebook"></i></div>
    	<?php endif; ?>
    	</header>
    
    <!-- #masthead -->
    
    	<div id="content" class="site-content container">

    https://www.ads-software.com/plugins/responsive-header-image-slider/

Viewing 1 replies (of 1 total)
  • Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello,

    Your theme already contains a <div class="site-branding"> div to your logo and a background image.

    If you want to show sliding banner on your home page then you can place

    <div class="headerslider"> <?php echo do_shortcode('[sp_responsiveslider limit="-1"]'); ?></div>

    code after sitr-branding DIV

    <div class="site-branding">
    				<?php if ( get_theme_mod('site_logo') ) : ?>
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a>
    				<?php else : ?>
    					<?php if ( display_header_text() ) : ?>
    						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    						<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    					<?php endif; ?>
    				<?php endif; ?>
    			</div>
    		</div>
    		<div class="headerslider"> <?php echo do_shortcode('[sp_responsiveslider limit="-1"]'); ?></div>

    You can setup the width of this slider as per your need

    thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with code embedding’ is closed to new replies.