Home › Forums › Themes Support › Claue › Change logo URL link
- This topic has 7 replies, 2 voices, and was last updated 4 years, 8 months ago by Harry.
-
AuthorPosts
-
-
September 19, 2019 at 12:42 pm #33642Psyfreak02Support Expired
How can I change the logo url to go to a differnt page other than the homepage I have set in WordPress?
-
September 19, 2019 at 5:04 pm #33647HarrySupport 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 -
September 19, 2019 at 5:14 pm #33648Psyfreak02Support 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 ‘&’
-
September 19, 2019 at 5:42 pm #33649HarrySupport 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 -
September 19, 2019 at 6:11 pm #33651Psyfreak02Support ExpiredThis reply has been marked as private.
-
September 19, 2019 at 7:55 pm #33653HarrySupport 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 -
September 19, 2019 at 7:57 pm #33654Psyfreak02Support 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.
-
September 19, 2019 at 9:23 pm #33658HarrySupport 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
-
-
AuthorPosts
You must be logged in to reply to this topic.