Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #80580
    Bret
    Member

    Hello,

    I purchased the Create Pro template, installed it, and have it working beautifully. Love the template. I have installed the Sangar slider and would like to place it in the logo section of the Home page. Is this possible? If so, how would this be achieved? Currently, the slider is disabled but you can see our site here:

    http://www.blacktieaffairband.net

    Thank you, in advance, for the help. It will be greatly appreciated.

    #80581
    Mahesh
    Keymaster

    Hi @Bret

    This has to be done by creating a child theme. Visit HERE to learn more about “How to create a child theme”.

    After that copy the header.php from Create Pro theme to Create Pro Child theme and replace the following code from line 36 – 45:

    <?php 
       	$jetpack_logo  = get_option( 'site_logo' );
    
    	if ( !empty( $jetpack_logo['id'] ) && function_exists( 'jetpack_the_site_logo' ) ) {
    		jetpack_the_site_logo(); 
    	}
        else {
        	create_display_logo();
    	}
    ?>

    with you slider code from plugin.

    Your header.php file will look like this.

    <?php
    /**
     * The header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package Create
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    
    <?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', 'create' ); ?></a>
    
    	<header id="masthead" class="site-header" role="banner">
        
        <div class="site-banner">
    		<div class="site-branding">
            
    		    <nav id="site-navigation" class="main-navigation create-menu" role="navigation">
    			    <button class="menu-toggle" aria-controls="menu" aria-expanded="false"><?php _e( 'Menu', 'create' ); ?></button>
    			    <?php wp_nav_menu( array( 
    				    'theme_location' => 'primary' ) 
    				    ); 
    				?>
    		    </nav><!-- #site-navigation -->
            
    		    <?php
                        /**
                         * Replace This Section
                         * With Your Slider
                         * Code
                         */
                        ?>	
    
    		    
    			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    			<p class="site-description"><?php bloginfo( 'description' ); ?></p>
    		</div><!-- .site-branding -->
            
            <?php if ( has_nav_menu( 'social' ) ) : ?>
                <div class="social-menu">
    		        <?php wp_nav_menu( array(
    				    'theme_location' => 'social',
    				    'depth'          => '1',
    				    'link_before'    => '<span class="screen-reader-text">',
    				    'link_after'     => '</span>' )
    				    );
                    ?>
                </div><!-- .social-menu -->       
            <?php endif; ?>
            
            </div><!-- .site-banner -->
           
    	</header><!-- #masthead -->
    
    	<?php	
    	/** 
    	 * create_before_content hook
    	 *
    	 * @hooked create_slider - 10
    	 */
    	do_action( 'create_before_content');
    	?>
    
    	<div id="content" class="site-content">

    Let me know if this helps to get what you want.

    #80589
    Bret
    Member

    @Mahesh,

    Thank you for the fast response! I will give this a try and let you know. Thank you so much.

    #80618
    Bret
    Member

    @Mahesh,

    Should I use the shortcode inside the .php tags as shown below?

    <?php
    [sangar-slider id=504]
    ?>

    No real success yet. I created and installed the child them and activated it. All was okay with it until I began editing files and getting internal server errors.

    Thank you.

    #80620
    Mahesh
    Keymaster

    @Bret

    Yes, you can use the shortcode for the slider inside php tags. But the code you’ve written is slightly incorrect. Use the code given below:

    <?php echo do_shortcode('[sangar-slider id=504]'); ?>

    This will place the slider in your page.
    Let me know if you’ve any problem.

    Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Replacing Logo with Slider’ is closed to new replies.