Skip to content Skip to sidebar Skip to footer

How To Add All Typography Options With Options Tree In Wordpress Theme?

I'm new to WordPress theme development, and I had to create a theme with options tree. I have successfully add some options with options tree plugin in my wordpress theme. But I am

Solution 1:

Here is an example of using optiontree typography option on the frontend.

$header_font = ot_get_option( 'heading_font' );
if(!empty($header_font)){
    $font = $header_font;
    $output .= 'h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6, h1 a, .h1 a, h2 a, .h2 a, h3 a, .h3 a, h4 a, .h4 a, h5 a, .h5 a, h6 a, .h6 a{font-family: '.$font['font-family'].'; font-style: '.$font['font-style'].'; font-variant:'.$font['font-variant'].'; font-weight:'.$font['font-weight'].'; letter-spacing:'.$font['letter-spacing'].';  text-decoration:'.$font['text-decoration'].';    text-transform:'.$font['text-transform'].';  }';     
}

Post a Comment for "How To Add All Typography Options With Options Tree In Wordpress Theme?"