Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

filtering site description or tagline

  1. I have been searching high and low trying to find the post that was on here a couple of months back on how to filter the site tagline/description...

    What I am trying to accomplish is that I have a two language site and want to be able to replace the tagline depending on what lang is selected.

    I am already filtering the hybrid_site_description with

    add_filter( 'hybrid_site_description', 'my_single_subtitle' );
    
    function my_single_subtitle( $title ) {
    	global $post;
    	if ( !is_page() )
    		return $title;
    
    	$subtitle = __(get_post_meta( $post->ID, 'Subtitle', true ));
    	if ( $subtitle )
    
    		$title .= '<div id="subheading"><span>' . $subtitle . '</span></div>';
    	return $title;
    }

    I would like the tagline to be visible throughout the whole site, but am kinda stumped on how to perform this, any help greatly received as usual...

  2. You must be a logged-in exclusive member to view this reply.

  3. Hi thanks for this couldn't get it to work, no errors or anything.. Just didn't filter it.

    add_filter( 'bloginfo', 'my_site_description', 10, 2 );
    function my_site_description( $output, $show ) {
    if ( 'description' == $show ) {
    
    if (qtrans_getLanguage()=="en")
    			$output = 'this is my en.';
    
    elseif (qtrans_getLanguage()=="fi")
    			$output = 'This is my Fin.';
    	}
    return $output;
    }

    I think it is something that I am not doing right, I will tidy up my functions.php a bit. I am sure that something in there is knocking this out. Once I have done that I will come back on this post and try again, don't want to waste your time, this is something I should be able to iron out myself.

    Thanks for your help again

  4. You must be a logged-in exclusive member to view this reply.

  5. great!

    worked a charm...
    you do realise that means I will put off cleaning up my functions.php :)

    This is what I used to filter the lang for those of you using qtranslate

    add_filter( 'option_blogdescription', 'my_site_description' );
    
    function my_site_description( $output ) {
    	$output = __('[:en]this is the eng.[:fi]this is the fi');
    
    	return $output;
    }

    Thanks Justin once again chapeau!

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Bliss Theme (253 posts)
  • Hybrid Theme (21,735 posts)
  • Options Theme (10,356 posts)
  • Structure Theme (2,747 posts)
  • Outline Theme (36 posts)
  • Visionary Theme (767 posts)
  • bbPress Themes (305 posts)
  • WordPress Plugins (2,045 posts)
  • General Discussion (5,276 posts)