• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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

  • Use PHP Function Call In Your Site Description

Site Description

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags