Your account expired support, please renew to get your support.

Home Forums Themes Support Claue Change logo URL link

Viewing 7 reply threads
  • Author
    Posts
    • #33642
      Psyfreak02
      Support Expired

      How can I change the logo url to go to a differnt page other than the homepage I have set in WordPress?

       

    • #33647
      Harry
      Support Expired

      Hi,

      Please add below code to claue-child > functions.php

      if ( ! function_exists( 'jas_claue_logo' ) ) {
      	function jas_claue_logo() {
      		$output = '';
      
      		$output .= '<div class="jas-branding ts__05">';
      			$output .= '<a class="db" href="' . esc_url( home_url( '/' ) ) . '">';
      				if ( ! cs_get_option( 'header-transparent' ) ) {
      					if ( cs_get_option( 'logo' ) ) {
      						$logo = wp_get_attachment_image_src( cs_get_option( 'logo' ), 'full', true );
      
      						$output .= '<img class="regular-logo normal-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />';
      						if ( cs_get_option( 'logo-sticky' ) ) {
      							$logo = wp_get_attachment_image_src( cs_get_option( 'logo-sticky' ), 'full', true );
      							$output .= '<img class="sticky-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />';
      						}
      					} else {
      						$output .= '<img class="regular-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />';
      					}
      
      					if ( cs_get_option( 'logo-retina' ) ) {
      						$logo_retina = wp_get_attachment_image_src( cs_get_option( 'logo-retina' ), 'full', true );
      
      						$output .= '<img class="retina-logo normal-logo" src="' . esc_url( $logo_retina[0] ) . '" width="' . esc_attr( $logo_retina[1] ? $logo_retina[1] / 2 : '' ) . '" height="' . esc_attr( $logo_retina[2] ? $logo_retina[2] / 2 : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />';
      					} else {
      						$output .= '<img class="retina-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo-2x.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />';
      					}
      				} else {
      					if ( cs_get_option( 'logo-transparent' ) ) {
      						$logo = wp_get_attachment_image_src( cs_get_option( 'logo-transparent' ), 'full', true );
      
      						$output .= '<img class="regular-logo normal-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />';
      						if ( cs_get_option( 'logo-sticky' ) ) {
      							$logo = wp_get_attachment_image_src( cs_get_option( 'logo-sticky' ), 'full', true );
      							$output .= '<img class="sticky-logo" src="' . esc_url( $logo[0] ) . '" width="' . esc_attr( $logo[1] ? $logo[1] : '' ) . '" height="' . esc_attr( $logo[2] ? $logo[2] : '' ) . '" alt="' . get_bloginfo( 'name' ) . '" />';
      						}
      					} else {
      						$output .= '<img class="regular-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />';
      					}
      
      					if ( cs_get_option( 'logo-transparent-retina' ) ) {
      						$logo_retina = wp_get_attachment_image_src( cs_get_option( 'logo-transparent-retina' ), 'full', true );
      
      						$output .= '<img class="retina-logo normal-logo" src="' . esc_url( $logo_retina[0] ) . '" width="' . esc_attr( $logo_retina[1] ? $logo_retina[1] : '' ) . '/2" height="' . esc_attr( $logo_retina[2] ? $logo_retina[2] : '' ) . '/2" alt="' . get_bloginfo( 'name' ) . '" />';
      					} else {
      						$output .= '<img class="retina-logo" src="' . JAS_CLAUE_URL . '/assets/images/logo-2x.png' . '" width="96" height="29" alt="' . get_bloginfo( 'name' ) . '" />';
      					}
      				}
      			$output .= '</a>';
      		$output .= '</div>';
      
      		echo apply_filters( 'jas_claue_logo', $output );
      	}
      }

      and change the code

      esc_url( home_url( '/' ) ) to your url.

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #33648
      Psyfreak02
      Support Expired

      Thanks for sending me this, however, when added, I get this error message:

      Your PHP code changes were rolled back due to an error on line 17 of file wp-content/themes/claue-childtheme/functions.php. Please fix and try saving again.

      syntax error, unexpected ‘&’

    • #33649
      Harry
      Support Expired

      Can you send me the link you want to redirect and wordpress admin account, ftp account and check in “Set as private reply”

      I will check and help you solve problem.

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #33651
      Psyfreak02
      Support Expired
      This reply has been marked as private.
    • #33653
      Harry
      Support Expired

      Hi,

      I fixed it for you. Please check.

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #33654
      Psyfreak02
      Support Expired

      Thank you for fixing this for my. I’m sorry to be a pain, but the logo has now been switched over to the other side. I would like to have it kept on the right hand side please.

    • #33658
      Harry
      Support Expired

      Did you override header layout file?

      Please copy file your edit to claue-child and activate claue-child. In future you can update without losing your code.

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 7 reply threads

You must be logged in to reply to this topic.