Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi florinangelescu. You could copy header.php to a child theme and modify it there.

    Thread Starter florinangelescu

    (@florinangelescu)

    I was actually asking what exactly should I modify?

    At the top of the header.php file you’ll find this code. You could just add your link there just before the <?php wp_head(); ?> line.

    <!DOCTYPE html>
    <html class="no-js" <?php language_attributes(); ?>>
    
    <head>
    	<meta charset="<?php bloginfo('charset'); ?>">
    	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    	<link rel="profile" href="https://gmpg.org/xfn/11">
    	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    
    	<?php wp_head(); ?>
    </head>
    Thread Starter florinangelescu

    (@florinangelescu)

    Thank you for the response, but it doesn’t seem to be working. ??
    I am using the Hueman theme. My blog is https://www.florinangelescu.ro

    What link did you add? And can you be more specific about what’s not working?

    Thread Starter florinangelescu

    (@florinangelescu)

    Added just a generic link to google.com just like this:

    <!DOCTYPE html>
    <html class="no-js" <?php language_attributes(); ?>>
    
    <head>
    	<meta charset="<?php bloginfo('charset'); ?>">
    	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    	<link rel="profile" href="https://gmpg.org/xfn/11">
    	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
            <a href="https://www.google.com" target="blank"></a>
    	<?php wp_head(); ?>
    </head>

    What is it you’re trying to accomplish? Are you trying to create a link in the site header that the user can click to go to google.com?

    Thread Starter florinangelescu

    (@florinangelescu)

    Yes. Right now, when I click the header it takes me to my own website.
    I want to change that and point to another website. ??

    If you’re referring to the site title, you would copy the alx_site_title function form the parent theme functions.php file to a child theme functions.php file:

    function alx_site_title() {
    
    	// Text or image?
    	if ( ot_get_option('custom-logo') ) {
    		$logo = '<img src="'.ot_get_option('custom-logo').'" alt="'.get_bloginfo('name').'">';
    	} else {
    		$logo = get_bloginfo('name');
    	}
    
    	$link = '<a href="'.home_url('/').'" rel="home">'.$logo.'</a>';
    
    	if ( is_front_page() || is_home() ) {
    		$sitename = '<h1 class="site-title">'.$link.'</h1>'."\n";
    	} else {
    		$sitename = '<p class="site-title">'.$link.'</p>'."\n";
    	}
    
    	return $sitename;
    }

    Then change the link variable to reflect the new target:

    $link = '<a href="https://www.google.com/" rel="search" target="_blank">'.$logo.'</a>';
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add other link to Hueman header’ is closed to new replies.