Gerri Jensen
Gerri Jensen

Reputation: 21

Adding Url to Tagline in wordpress

I tried adding this to the child theme functions.php. I used the code for the logo url as a model. I need the tagline to link to a url.

add_action('parse_request', 'my_custom_url_handler');
function my_custom_url_handler() {
   if  ( !in_array( '__navbar' , $wp_current_filter ) ) 
     <span class="header-tagline  <?php czr_fn_echo( 'element_class' ) ?>" 
        <?php czr_fn_echo( 'element_attributes' ) ?>>
        <a  href="<?php echo esc_url( home_url( '/' ) )
          <?php echo get_bloginfo( 'description', 'display' ) ?>
        </a>
     </span>
   <?php endif; ?>
}

Upvotes: 0

Views: 341

Answers (1)

Lee
Lee

Reputation: 4323

add_filter('option_blogdescription', 'custom_option_description', 10, 1);
function custom_option_description($value) {
    return 'custom description';
}

Simple function in your child functions file

Upvotes: 1

Related Questions