• Resolved Hannes Salen

    (@hannes-salen)


    I used to have font awesome icons in my subheading. For this I added a functions.php to my child theme with below code, but since the hueman update this doesn’t work anymore.

    function alx_blog_title() {
    	global $post;
    	$heading = esc_attr( ot_get_option('blog-heading') );
    	$subheading = ot_get_option('blog-subheading');
    	if($heading) {
    		$title = $heading;
    	} else {
    		$title = get_bloginfo('name');
    	}
    	if($subheading) {
    		$title = $title.' <span>'.$subheading.'</span>';
    	}
    
    	return $title;
    }

    Any help would be appreciated!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hi Hannes,

    The name of the function has changed for consistency reasons.
    Simply replace alx_blog_title() by hu_blog_title() and you should be fine.

    Hope this helps

    Thread Starter Hannes Salen

    (@hannes-salen)

    Hi Nikeo,

    I just changed it in the function.php of my child theme but the subheading does still show <i class=”fa fa-envelope”> instead of the icon. Any idea how I can solve this?

    thanks for the quick reply btw.

    Hannes

    Theme Author presscustomizr

    (@nikeo)

    Can you please paste your new code for the blog title function ?
    thanks

    Thread Starter Hannes Salen

    (@hannes-salen)

    function hu_blog_title() {
    	global $post;
    	$heading = esc_attr( ot_get_option('blog-heading') );
    	$subheading = ot_get_option('blog-subheading');
    	if($heading) {
    		$title = $heading;
    	} else {
    		$title = get_bloginfo('name');
    	}
    	if($subheading) {
    		$title = $title.' <span>'.$subheading.'</span>';
    	}
    
    	return $title;
    }
    Theme Author presscustomizr

    (@nikeo)

    thanks
    this code does not include anything related like :

    <i class="fa fa-envelope">

    Can you check in the customizer > content > blog design and content, if the heading and subheading fields are correctly setup?

    Thread Starter Hannes Salen

    (@hannes-salen)

    Sorry, the code I gave in previous post is what is the functions.php of my child theme.
    The code I used in blog sub-heading in customizer is:
    <i class="fa fa-envelope"></i><a title="Set out of office" href="http://europe/ere/?p=177" target="_blank">Important info on how to login to set your out of office! </a><i class="fa fa-envelope"></i>

    This code with the functions.php worked in the previous version of hueman, now I only get the plain text.

    Theme Author presscustomizr

    (@nikeo)

    OK thanks.
    The html tags are being stripped out from the customizer fields for security reasons.
    I will probably safely allow Html in some fields like this one and the footer copyright in a future update.

    Before that, the simplest way to apply your previous changes would be to add the following code to your child theme functions.php file :

    function hu_blog_title() {
      return sprintf('<i class="fa fa-envelope"></i><a title="Set out of office" href="http://europe/ere/?p=177" target="_blank">Important info on how to login to set your out of office! </a>
      <i class="fa fa-envelope"></i>');
    }

    hope this helps 🙂

    Thread Starter Hannes Salen

    (@hannes-salen)

    Ok thanks for the help, great support an really great theme btw!!!

    Thread Starter Hannes Salen

    (@hannes-salen)

    I noticed this has already been fixed in the last update thanks for that!!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Use font awesome in blog subheading?’ is closed to new replies.