Add Clickable Site Description With Custom Font

In this tutorial, i’ll provide the PHP and CSS code you can use or modify to make your sites description clickable.

All you need to do is hook in a new tagline with link and add some styling.

Please paste this code at the end of your child themes functions.php file.

remove_action( 'genesis_site_description', 'genesis_seo_site_description' );

function custom_site_description() { 
    echo '<div class="custom-description"><p style="text-align: center;"><a href="http://yourdomain.com/link/">Add Your Site Description Here</p></div>';
};

add_action( 'genesis_site_description', 'custom_site_description' );

Remove the HTML from the code that centers the text if needed.

<p style="text-align: center;">

You can easily create a description in a new post draft and even center and style it before adding it to the above code. Or add all the styling using CSS.

Next step is to add some styling.

.custom-description {
    font-family: 'Oswald',arial,serif;
    font-size: 24px;
    font-weight: normal;
    margin: 0;
    text-shadow: 1px 1px 1px #070707;
}

This CSS uses a custom Google font named Oswald which you’ll need to add to your child themes functions.php file using some PHP code.

add_action( 'wp_enqueue_scripts', 'wpsites_load_google_font' );
function wpsites_load_google_font() {
	wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Oswald:400', array(), CHILD_THEME_VERSION );
}

Grab your own web font from Google and replace the url in the PHP code above to suit your style.

Filter Site Description & Add Link

You can also use the genesis_seo_description filter to modify the output of the default description and add a link to any url.

Related Code

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.