Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #97437
    Paul
    Participant

    Hi,

    In Catch Kathmandu Pro I would like to move the site title to below the slider / header image.

    Thanks

    Paul

    #97450
    Mahesh
    Participant

    @paul-mac:
    Hi Paul,

    For this, you’ll need to create a child theme. You can find more details on creating child theme HERE. Then in your child theme’s functions.php add the following codes:

    function catchkathmandu_child_move_title_below_slider_header_image() {
    	remove_action( 'catchkathmandu_before_main', 'catchkathmandu_slider_display', 10 );
    	add_action( 'catchkathmandu_before_hgroup_wrap', 'catchkathmandu_slider_display', 15 );
    
    	remove_action( 'catchkathmandu_before', 'catchkathmandu_featured_image_display', 10 );
    	add_action( 'catchkathmandu_before_hgroup_wrap', 'catchkathmandu_featured_overall_image', 20 );
    }
    add_action( 'init', 'catchkathmandu_child_move_title_below_slider_header_image' );

    Regards,
    Mahesh

    #97475
    Paul
    Participant

    Hi,

    Thanks for the rapid response. Unfortunately the fix doesn’t work. 1) You made an error between the name of the function and the line calling it, but never mind and 2) I’ve ended up with the site title, description and site logos moving below the static image and in addition I now have 2 copies of the image, one above the title, description, logo block and one below it. I want to keep the logos above the image and the site title and description below the image.

    BTW I also have the following included in the functions.php file which you supplied me a while back, which works fine.

    /* Moving Primary Menu below Slider */

    add_action( ‘init’ , ‘catchkathmandu_child_move_menu_below_slider’ );
    function catchkathmandu_child_move_menu_below_slider() {
    remove_action( ‘catchkathmandu_hgroup_wrap’, ‘catchkathmandu_header_right’, 15 );
    add_action( ‘catchkathmandu_before_main’, ‘catchkathmandu_header_right’, 15 );

    }
    Thanks
    Paul

    #97512
    Mahesh
    Participant

    @paul-mac: Sorry, I changed the function name but forgot to change in the hook. And I’ve changed the hook for the header image too so only one image displays now. I have made the correction in the above code, please check.

    Regards,
    Mahesh

    #97547
    Paul
    Participant

    Hi,

    That has got rid of the second copy of the header image – thank you – but the site logo is still underneath the header image, whereas I would like it to be above.

    Thanks

    Paul

    #97667
    Pratik
    Participant

    @paul-mac:
    If you want logo above and site title below slider image/header image, then you will need to do something different. Remove the previous code provided by Mahesh and add in following code:

    
    function catchkathmandu_header_image() {
    	//Get Theme Options Data
    	global $catchkathmandu_options_settings;
    	$options                    = $catchkathmandu_options_settings;
    	$header_image               = get_header_image();
    	$catchkathmandu_header_logo = '';
    
    	?>
    	<div id="header-left">
    		<?php
    		//Checking Logo/Header Image
    		if( function_exists( 'has_custom_logo' ) ) :
    			if( has_custom_logo() ) :
    				$catchkathmandu_header_logo = '<div id="site-logo">' . get_custom_logo() .  '</div><!-- #site-logo -->';
    			endif;
    		elseif ( !empty( $header_image ) ) :
    			$catchkathmandu_header_logo = '
    			<div id="site-logo">
                	<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '">
                		<img src="' . esc_url( $header_image ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />
    				</a>
    			</div><!-- #site-logo -->';
    		endif;
    
    		echo $catchkathmandu_header_logo;
    		?>
    
    	</div><!-- #header-left"> -->
    <?php 
    }
    
    function catchkathmandu_child_site_header_only() {
    	echo '
    		<div class="container" id="hgroup-wrap">
    			<div id="hgroup">
    				<h1 id="site-title">
    					<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" rel="home">' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '</a>
    				</h1>
    				<h2 id="site-description"> ' . esc_attr( get_bloginfo( 'description', 'display' ) ) . '</h2>
    			</div><!-- #hgroup -->
    		</div>';
    }
    add_action( 'catchkathmandu_before_main', 'catchkathmandu_child_site_header_only', 15 );
    

    Let me know how it goes.

    Regards,
    Pratik

    #97672
    Paul
    Participant

    Perfect,

    Thank you

    #97683
    Pratik
    Participant

    @paul-mac: You are welcome 😀

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Move site title & description’ is closed to new replies.