Mia Holte
asked 8 years ago

Hi
In DW Timeline Pro, strong/b formatting in posts won’t show up because you can only load one font-weight at a time in the admin. Is there any chance you will fix that (add option to allow multi font-weights)? Italics seem to be working…

4 Answers
Wilfred
answered 8 years ago

Hi Mia, 
To change font weight you can use inline style.
Example: 

   <strong style="font-weight: 300">Content</strong>

Hope this helps !

Mia Holte
replied 8 years ago

First of all, that is not a good option, semantically (I should probably tell you I work as a web designer).

Second, that will not work, as long as the code doesn’t load bold font-weight from Google (?), because of your admin settings.

To use strong, you need to load bold fonts as well. So the right thing to do would be to allow users to choose how many font weights to apply in the theme, from admin. Am I making sense?

Wilfred
answered 8 years ago

Hi Mia,
Thank you for your suggestion, we highly appreciate it.
We will consider your option that you posted to add it to the next version of the theme.
And below is our instruction for customizing the font-weight.
– Add the following codes to the Header Code section in Dashboard / Appearance / Customize / Custom Code / Header Code:

 <style>
b,strong,optgroup,h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,dt,
label,.label,.badge,.close,blockquote p,.alert .alert-link.dropcap,.banner,.page-title,.navbar-toggle,.nav-main a,.widget-title,.widget_calendar a,.widget_nav_menu a,.timeline-scrubber a,.timeline-pale span,#infscr-loading,
.single .cover + .container .entry-title,
.adjacent-post .entry-title,
.page .banner.cover + .container .page-header h1,
.error404 .main a,
.style-flat .btn {
font-weight: 100;
}
</style>

Please replace the value “100” with yours.
Hope this helps !

Mia Holte
replied 8 years ago

That still won't solve the problem, as long as the font-weight is not loaded 😉

The problem exists here: <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700&#039; rel='stylesheet' type='text/css'>

When a user choose a paragraph font in admin, you need to add the bold font-weight as default as well (and not just regular and italics). People use <strong> bold </strong> font-weight to emphasize parts of paragraph 🙂

Eddy La
answered 8 years ago

Hi !

I’ve the same problem with DW Argo. When do you plan to fix it ? It’s a pitty that I can’t make my text bold

Mia Holte
replied 8 years ago

Amen. One shouldn’t have to add a fix in the code for this one! 🙂

Eddy La
replied 8 years ago

Yes, it’s unbelievable that they don’t support bold. And I don’t like the fact that we’re oblige to use their built-in font system.

Wilfred
answered 8 years ago

To resolve this issue you can try this solution, please follow my instruction here:
1. Open customizer.php in /wp-content/themes/dw-timeline-pro/lib/customizer.php
2. Replace following code – line 422

$newarray[$font->family . ':dw:' . $value ] = $font->family . ' - ' . $key;

with:

$newarray[$font->family . ':dw:' . $value . ':dw:' . $key ] = $font->family . ' - ' . $key;

3. Replace following code – line 792

font-family: "<?php echo $heading_font[0] ?>" !important;

with:

font-family: "<?php echo $heading_font[0] ?>" !important;
<?php if ( intval($heading_font[2]) ) : ?>
font-weight: <?php echo intval($heading_font[2]) ?> !important;
<?php else : ?>
font-weight: inherit !important;
<?php endif; ?>

4. Replace following code – line 811

font-family: "<?php echo $body_font[0] ?>" !important;

with:

font-family: "<?php echo $body_font[0] ?>" !important;
<?php if ( intval($body_font[2]) ) : ?>
font-weight: <?php echo intval($body_font[2]) ?> !important;
<?php else : ?>
font-weight: inherit !important;
<?php endif; ?>

Hope this helps!  

Powered by DW Question & Answer Pro