Home Forums WoodMart support forum Image zoom

Image zoom

Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #38486

    leonidas
    Participant

    Hello
    look at the video please and tell me if it is a known bug or it has to do with my configuration.
    Regards Leonidas

    #38519

    Artem Temos
    Keymaster

    Hi,

    Since we don’t see any problems with our theme it seems to be some issue with your configuration only. Are you able to remove all your extra customization and upload our theme original files and check again?

    Thank you in advance.

    #38520

    leonidas
    Participant

    I will do that and report back.
    Thank you

    #38579

    Artem Temos
    Keymaster

    OK, contact us if you will have extra questions.

    #38661

    leonidas
    Participant

    Found it.It was a plugin http://prntscr.com/iceehe
    I installed it on purpose to get rid of a Gtmetrix notice :

    Do you have any idea how to avoid this error?

    #38716

    Artem Temos
    Keymaster

    You need to find those images on your website and specify size attributes like this example

    <img src="" width="" height="" />

    Regards

    #39016

    leonidas
    Participant

    Ok I understand but where exactly do we insert that information? Let’s say for my logo

    #39038

    Artem Temos
    Keymaster

    Logo image HTML code can be found in the file inc/template-tags.php.

    #39114

    leonidas
    Participant

    I managed to solve the problem with the other svg images.Only the logo left.
    The procedure I followed:
    1. Create a folder with the name “inc” inside the cild theme.
    2. Copied the file template-tags.php
    3. Add a code in line 517 pointing my logo image position.

    What I am doing wrong?

    #39117

    Artem Temos
    Keymaster

    Try to paste this code snippet to the functions.php file in your child theme and edit it

    function woodmart_header_block_logo() {
    
    	$header_color_scheme = woodmart_get_opt( 'header_color_scheme' );
    
    	// Get the logo
    	$logo 		= WOODMART_IMAGES . '/wood-logo-dark.svg';
    	$logo_white = WOODMART_IMAGES . '/wood-logo-white.svg';
    
    	$protocol = woodmart_http() . "://";
    
    	$logo_uploaded = woodmart_get_opt('logo');
    	$logo_white_uploaded = woodmart_get_opt('logo-white');
    	$logo_sticky_uploaded = woodmart_get_opt('logo-sticky');
    	$has_sticky_logo = ( isset( $logo_sticky_uploaded['url'] ) && ! empty( $logo_sticky_uploaded['url'] ) );
    
    	if(isset($logo_white_uploaded['url']) && $logo_white_uploaded['url'] != '') {
    		$logo_white = $logo_white_uploaded['url'];
    	}
    	if(isset($logo_uploaded['url']) && $logo_uploaded['url'] != '') {
    		$logo = $logo_uploaded['url'];
    	}
    
    	if( $header_color_scheme == 'light' ) {
    		$logo = $logo_white;
    	}
    
    	$logo = $protocol. str_replace(array('http://', 'https://'), '', $logo);
    
    	?>
    		<div class="site-logo">
    			<div class="woodmart-logo-wrap<?php if( $has_sticky_logo ) echo " switch-logo-enable"; ?>">
    				<a href="<?php echo esc_url( home_url('/') ); ?>" class="woodmart-logo woodmart-main-logo" rel="home">
    					<?php echo '<img src="' . $logo . '" alt="' . get_bloginfo( 'name' ) . '" />'; ?>
    				</a>
    				<?php if ( $has_sticky_logo ): ?>
    					<?php 
    						$logo_sticky = $protocol . str_replace( array( 'http://', 'https://' ), '', $logo_sticky_uploaded['url'] );
    					 ?>
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="woodmart-logo woodmart-sticky-logo" rel="home">
    						<?php echo '<img src="' . $logo_sticky . '" alt="' . get_bloginfo( 'name' ) . '" />'; ?>
    					</a>
    				<?php endif ?>
    			</div>
    		</div>
    	<?php
    }
    #39123

    leonidas
    Participant

    Paste the code and adit it but I see the same warning

    #39160

    Artem Temos
    Keymaster

    You need to specify your image size exact value in pixels. You can’t use % or auto values in that attributes.

    #39233

    leonidas
    Participant

    Change the values.
    Now every time I click over the logo I see a 403 forbidden error.
    Please I need your advice.

    #39242

    leonidas
    Participant

    I forgot to remove a dot.But it didn’t make any difference

    #39278

    Artem Temos
    Keymaster

    Still see wrong characters in the href="" attribute for the logo.

    #39290

    leonidas
    Participant

    Since a freelance developer is working on my development site I decided to make the changes to my final domain.So check there to see the problem.

    #39312

    Artem Temos
    Keymaster

    As we said, you have a wrong character there https://gyazo.com/a245cd3167172028f1dd02632a7f2a45

    #39328

    leonidas
    Participant

    I see.Corrected the wrong character.Now look at the video.

    #39329

    Artem Temos
    Keymaster

    But you set the href attribute to your SVG icon. Of course, when you click it you will be redirected to the page that displays this image. Read more information about A and IMG tag
    https://www.w3schools.com/tags/tag_a.asp
    https://www.w3schools.com/tags/tag_img.asp

    #39332

    leonidas
    Participant

    Maybe it looks easy for you but I am not a theme developer.I just selling sunglasses!Ok I have learned some CSS to do the basics but it’s not the time to learn Html code and Php or anything else.At least you should point me with an image where and what to change in your code.I need to close that ticket.I am tired.

    #39337

    Artem Temos
    Keymaster

    OK, could you please paste the final function for the logo you have in the child theme now so we can check it?

    #39339

    leonidas
    Participant

    Check the function.php file.
    Use the login and FTP credentials you already have in the development site.Don’t forget to tell me the changes that you have made.
    Thank you

    #39375

    Artem Temos
    Keymaster

    Sorry, but we can’t find the FTP access. Could you please just send us the code for that function?

    #39405

    leonidas
    Participant

    I send you again my Ftp access

    #39407

    Artem Temos
    Keymaster

    The function should look like this

    function woodmart_header_block_logo() {
    
    	$header_color_scheme = woodmart_get_opt( 'header_color_scheme' );
    
    	// Get the logo
    	$logo 		= WOODMART_IMAGES . '/wood-logo-dark.svg';
    	$logo_white = WOODMART_IMAGES . '/wood-logo-white.svg';
    
    	$protocol = woodmart_http() . "://";
    
    	$logo_uploaded = woodmart_get_opt('logo');
    	$logo_white_uploaded = woodmart_get_opt('logo-white');
    	$logo_sticky_uploaded = woodmart_get_opt('logo-sticky');
    	$has_sticky_logo = ( isset( $logo_sticky_uploaded['url'] ) && ! empty( $logo_sticky_uploaded['url'] ) );
    
    	if(isset($logo_white_uploaded['url']) && $logo_white_uploaded['url'] != '') {
    		$logo_white = $logo_white_uploaded['url'];
    	}
    	if(isset($logo_uploaded['url']) && $logo_uploaded['url'] != '') {
    		$logo = $logo_uploaded['url'];
    	}
    
    	if( $header_color_scheme == 'light' ) {
    		$logo = $logo_white;
    	}
    
    	$logo = $protocol. str_replace(array('http://', 'https://'), '', $logo);
    
    	?>
    		<div class="site-logo">
    			<div class="woodmart-logo-wrap<?php if( $has_sticky_logo ) echo " switch-logo-enable"; ?>">
    				<a href="<?php echo esc_url( home_url('/') ); ?>" class="woodmart-logo woodmart-main-logo" rel="home">
    					<?php echo '<img src="' . $logo . '" alt="' . get_bloginfo( 'name' ) . '" width="190" height="70" />'; ?>
    				</a>
    				<?php if ( $has_sticky_logo ): ?>
    					<?php 
    						$logo_sticky = $protocol . str_replace( array( 'http://', 'https://' ), '', $logo_sticky_uploaded['url'] );
    					 ?>
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="woodmart-logo woodmart-sticky-logo" rel="home">
    						<?php echo '<img src="' . $logo_sticky . '" alt="' . get_bloginfo( 'name' ) . '" />'; ?>
    					</a>
    				<?php endif ?>
    			</div>
    		</div>
    	<?php
    }
    #39432

    leonidas
    Participant

    Ok thank you.You can close the ticket
    Regards

Viewing 26 posts - 1 through 26 (of 26 total)

The topic ‘Image zoom’ is closed to new replies.