• I am pretty new to wordpress and trying to build a small site related to my company’s primary website. In this site, I am trying to add a hyperlink to the tagline of “Sponsored by North Star Camp for Boys”, but cannot figure out how to do so in the editor or in the php coding. I would love to hear ideas how I can get this done. Thanks.

    Website: boys.camp

Viewing 1 replies (of 1 total)
  • Hi,

    To add link to the site description, firstly you have to create a child theme first and activate it then you can follow these steps below:

    1. Open functions.php file on your parent theme and replace this code:

    if ( ! function_exists( 'astrid_branding' ) ) :
    function astrid_branding() {
    	$site_logo = get_theme_mod('site_logo');	
    	if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
    		the_custom_logo();
    	} elseif ( $site_logo ) {
    		echo '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr(get_bloginfo('name')) . '"><img class="site-logo" src="' . esc_url($site_logo) . '" alt="' . esc_attr(get_bloginfo('name')) . '" /></a>'; 
    	} else {
    		if ( is_front_page() && is_home() ) {
    			echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></h1>';
    		} else {
    			echo '<p class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></p>';
    		}
    		echo '<p class="site-description">' . esc_html(get_bloginfo( 'description' )) . '</p>';
    	}
    }
    endif;

    with this:

    /* if ( ! function_exists( 'astrid_branding' ) ) :
    function astrid_branding() {
    	$site_logo = get_theme_mod('site_logo');	
    	if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
    		the_custom_logo();
    	} elseif ( $site_logo ) {
    		echo '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr(get_bloginfo('name')) . '"><img class="site-logo" src="' . esc_url($site_logo) . '" alt="' . esc_attr(get_bloginfo('name')) . '" /></a>'; 
    	} else {
    		if ( is_front_page() && is_home() ) {
    			echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></h1>';
    		} else {
    			echo '<p class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></p>';
    		}
    		echo '<p class="site-description">' . esc_html(get_bloginfo( 'description' )) . '</p>';
    	}
    }
    endif; */

    2. Open functions.php file on your child theme, then add this code:

    if ( ! function_exists( 'astrid_branding' ) ) :
    function astrid_branding() {
    	$site_logo = get_theme_mod('site_logo');	
    	if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
    		the_custom_logo();
    	} elseif ( $site_logo ) {
    		echo '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr(get_bloginfo('name')) . '"><img class="site-logo" src="' . esc_url($site_logo) . '" alt="' . esc_attr(get_bloginfo('name')) . '" /></a>'; 
    	} else {
    		if ( is_front_page() && is_home() ) {
    			echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></h1>';
    		} else {
    			echo '<p class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . esc_html(get_bloginfo('name')) . '</a></p>';
    		}
    		echo '<p class="site-description"><a href="YOUR URL HERE">' . get_bloginfo( 'description' ) . '</a></p>';
    	}
    }
    endif;

    In the code in above, please change YOUR URL HERE with your URL.

Viewing 1 replies (of 1 total)
  • The topic ‘Can I add a link to the text in a tagline?’ is closed to new replies.