• Can anyone point to me to location in the code where I can change the URL that the site logo is linked to?

    I have searched various words and combinations of words in the .php files to no avail. I’m trying to avoid skimming all the code to find it ??

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello silvereyesphoto,

    Code that you want is in header.php file located at wp-content/themes/first/ folder. Below lines are located in header.php file, you have to remove <?php echo esc_url( home_url( '/' ) ); ?> line from code and put you url like https://www.domain.com.


    <h1 class="site-logo">" rel="home"><?php first_logo(); ?></h1>
    <?php endif; ?>
    <?php if ( ! ( get_theme_mod( 'first_logo' ) && get_theme_mod( 'first_replace_blogname' ) ) ) :?>
    <h1 class="site-title">" rel="home"><?php bloginfo( 'name' ); ?></h1>

    Note : All Changes you done in theme’s files are gone when you update theme. So prefer Child Theme.

    Hope this will helps you.

    Thread Starter silvereyesphoto

    (@silvereyesphoto)

    Thank you so much @saurabhdhariwal! That worked perfectly. Thank you also for the tip about the child theme. I will be sure to get around to creating one before I update this theme in future.

    Perhaps you could answer another question for me – where do I adjust the code to open this URL in the same window? It currently opens in a pop up window.

    I appreciate your help very much, thank you.

    Hello silvereyesphoto,

    Please provide your code here with the link of your website. So, that I will review it and provide you solution.

    Thread Starter silvereyesphoto

    (@silvereyesphoto)

    Thank you. I have one wordpress site that I have split in two – my existing photography business is at https://www.silvereyesphotography.com.au, and I am adding pages to the site as part of my student work for graphic design, so I have applied a different template to these pages to give the appearance of two websites. This is why I needed to change the logo URL, so that I went to a different ‘home’ page. The design website starts here https://www.silvereyesphotography.com.au/about/

    I hope that makes sense!

    <?php
    /**
    * The Header for our theme.
    *
    * Displays all of the <head> section and everything up till <div id=”content”>
    *
    * @package First
    */
    ?><!DOCTYPE html>
    <!–[if IE 8]>
    <html class=”ie8″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if !(IE 8) ]><!–>
    <html <?php language_attributes(); ?>>
    <!–<![endif]–>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
    <?php if ( ! get_theme_mod( ‘first_disable_responsive’ ) ) : ?>
    <meta name=”viewport” content=”width=device-width, initial-scale=1″>
    <?php endif; ?>
    <link rel=”profile” href=”https://gmpg.org/xfn/11″&gt;
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”>
    <!–[if lt IE 9]>
    <script src=”<?php echo get_template_directory_uri(); ?>/js/html5shiv.js”></script>
    <![endif]–>
    <?php wp_head(); ?>
    </head>

    <body <?php body_class(); ?>>
    <div id=”page” class=”hfeed site”>
    <?php _e( ‘Skip to content’, ‘first’ ); ?>

    <header id=”masthead” class=”site-header” role=”banner”>
    <div class=”site-top”>
    <div class=”site-top-table”>
    <div class=”site-branding”>
    <?php if ( get_theme_mod( ‘first_logo’ ) ) : ?>
    <h1 class=”site-logo”><?php first_logo(); ?></h1>
    <?php endif; ?>
    <?php if ( ! ( get_theme_mod( ‘first_logo’ ) && get_theme_mod( ‘first_replace_blogname’ ) ) ) :?>
    <h1 class=”site-title”>” rel=”home”><?php bloginfo( ‘name’ ); ?></h1>
    <?php endif; ?>
    <?php if ( ! get_theme_mod( ‘first_hide_blogdescription’ ) ) : ?>
    <div class=”site-description”><?php bloginfo( ‘description’ ); ?></div>
    <?php endif; ?>
    </div>

    <?php if ( has_nav_menu( ‘header’ ) ) : ?>
    <nav id=”header-navigation” class=”header-navigation” role=”navigation”>
    <?php wp_nav_menu( array( ‘theme_location’ => ‘header’, ‘depth’ => 2 ) ); ?>
    </nav><!– #header-navigation –>
    <?php endif; ?>
    </div>
    </div>

    <?php if ( ! get_theme_mod( ‘first_hide_navigation’ ) ) : ?>
    <div class=”site-bar”>
    <nav id=”site-navigation” class=”main-navigation” role=”navigation”>
    <div class=”menu-toggle”><?php _e( ‘Menu’, ‘first’ ); ?></div>
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>
    <?php if ( ! get_theme_mod( ‘first_hide_search’ ) ) : ?>
    <?php get_search_form(); ?>
    <?php endif; ?>
    </nav><!– #site-navigation –>
    </div>
    <?php endif; ?>

    <?php if ( is_home() && get_header_image() ) : ?>
    <div id=”header-image” class=”header-image”>
    ” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=””>
    </div><!– #header-image –>
    <?php elseif ( is_page() && has_post_thumbnail() ) : ?>
    <div id=”header-image” class=”header-image”>
    <?php the_post_thumbnail( ‘first-page-thumbnail’ ); ?>
    </div><!– #header-image –>
    <?php endif; ?>
    </header><!– #masthead –>

    <div id=”content” class=”site-content”>

    Thread Starter silvereyesphoto

    (@silvereyesphoto)

    Reposted because I realise I didn’t hit ‘reply’ to you before ??

    Thank you. I have one wordpress site that I have split in two – my existing photography business is at https://www.silvereyesphotography.com.au, and I am adding pages to the site as part of my student work for graphic design, so I have applied a different template to these pages to give the appearance of two websites. This is why I needed to change the logo URL, so that I went to a different ‘home’ page. The design website starts here https://www.silvereyesphotography.com.au/about/

    I hope that makes sense!

    <?php
    /**
    * The Header for our theme.
    *
    * Displays all of the <head> section and everything up till <div id=”content”>
    *
    * @package First
    */
    ?><!DOCTYPE html>
    <!–[if IE 8]>
    <html class=”ie8″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if !(IE 8) ]><!–>
    <html <?php language_attributes(); ?>>
    <!–<![endif]–>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
    <?php if ( ! get_theme_mod( ‘first_disable_responsive’ ) ) : ?>
    <meta name=”viewport” content=”width=device-width, initial-scale=1″>
    <?php endif; ?>
    <link rel=”profile” href=”https://gmpg.org/xfn/11″>
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”>
    <!–[if lt IE 9]>
    <script src=”<?php echo get_template_directory_uri(); ?>/js/html5shiv.js”></script>
    <![endif]–>
    <?php wp_head(); ?>
    </head>

    <body <?php body_class(); ?>>
    <div id=”page” class=”hfeed site”>
    <?php _e( ‘Skip to content’, ‘first’ ); ?>

    <header id=”masthead” class=”site-header” role=”banner”>
    <div class=”site-top”>
    <div class=”site-top-table”>
    <div class=”site-branding”>
    <?php if ( get_theme_mod( ‘first_logo’ ) ) : ?>
    <h1 class=”site-logo”><?php first_logo(); ?></h1>
    <?php endif; ?>
    <?php if ( ! ( get_theme_mod( ‘first_logo’ ) && get_theme_mod( ‘first_replace_blogname’ ) ) ) :?>
    <h1 class=”site-title”>” rel=”home”><?php bloginfo( ‘name’ ); ?></h1>
    <?php endif; ?>
    <?php if ( ! get_theme_mod( ‘first_hide_blogdescription’ ) ) : ?>
    <div class=”site-description”><?php bloginfo( ‘description’ ); ?></div>
    <?php endif; ?>
    </div>

    <?php if ( has_nav_menu( ‘header’ ) ) : ?>
    <nav id=”header-navigation” class=”header-navigation” role=”navigation”>
    <?php wp_nav_menu( array( ‘theme_location’ => ‘header’, ‘depth’ => 2 ) ); ?>
    </nav><!– #header-navigation –>
    <?php endif; ?>
    </div>
    </div>

    <?php if ( ! get_theme_mod( ‘first_hide_navigation’ ) ) : ?>
    <div class=”site-bar”>
    <nav id=”site-navigation” class=”main-navigation” role=”navigation”>
    <div class=”menu-toggle”><?php _e( ‘Menu’, ‘first’ ); ?></div>
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>
    <?php if ( ! get_theme_mod( ‘first_hide_search’ ) ) : ?>
    <?php get_search_form(); ?>
    <?php endif; ?>
    </nav><!– #site-navigation –>
    </div>
    <?php endif; ?>

    <?php if ( is_home() && get_header_image() ) : ?>
    <div id=”header-image” class=”header-image”>
    ” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=””>
    </div><!– #header-image –>
    <?php elseif ( is_page() && has_post_thumbnail() ) : ?>
    <div id=”header-image” class=”header-image”>
    <?php the_post_thumbnail( ‘first-page-thumbnail’ ); ?>
    </div><!– #header-image –>
    <?php endif; ?>
    </header><!– #masthead –>

    <div id=”content” class=”site-content”>

    Hello silvereyesphoto,

    I saw that pop up window will appear by some fancybox js files. Please deactivate all your plugins and then check.
    First of all deactivate Nextgen Gallery plugin then check.

    Hope this will helps you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change URL link in logo’ is closed to new replies.