Dropcap 3 by default

Posted in: Newspaper
Post count: 28

Hi guys, I was wondering if there’s a way to make the Dropcap 3 become the default Dropcap. This would help eliminating a extra step to our editors and if we could make the first letter of a post Dropcap 3 by default already it would be perfect, but we would be happy just to have Dropcap 3 as default when we enable dropcap in the Gutenberg editor.

Cheers

Post count: 27744

Hello,

You can change the drop cap in the theme files. That code is set on this file -> wp-content/plugins/td-composer/legacy/Newspaper/includes/td_config.php -> https://i.imgur.com/8EIH6Dd.png

Thank you!

Post count: 28

I see but I don’t understand how do I change this piece of code to apply the dropcap 3 by default?

Post count: 35449

Hi casprom,
Maybe I do not understand correctly what you mean, but the dropcap is not set by default, each time when you want to use it you need to choose the dropcap, an default option will be like there will no longer be need to choose a dropcap -> https://i.imgur.com/Q1u2TEs.png
If this is not what you mean, then please let us know!

Post count: 28

Hi Calin, what we mean is that when we enable the Dropcap (https://drive.google.com/file/d/1BMVXs8PNQMlcrEU_OvXmJ62X6ytxD7dv/view?usp=sharing) in the Theme Settings there’s a selection menu which by default has the “Box” style (Dropcap0 in code) selected, and everyone has to remember to change to “Bold” (translated “Negrito”, Dropcap3 in code) https://drive.google.com/file/d/1jziT-NxLZ6HsFX-VDhl3cbUFxaT-KcuI/view?usp=sharing . Being Bold the most standard in every website for Dropcaps, we want to make it show up as the default selected instead of Box which no one uses, so everyone doesn’t have to remember to take the extra step of selecting the Bold in the Theme Settings menu for every new post they make.

Post count: 35449

I understand. Then I think that will be a better idea to set the css code from the Dropcap3 on the “Box” style (Dropcap0) in this way the css style will apply after a theme update (the changes in the theme files will be removed when the theme will be updated).
You can try this custom css https://pastebin.com/32B0FSqQ set the code in the theme panel > custom code> custom css.
If is not working, then please replace it with this one https://pastebin.com/fqGWeL00
Let me know the results!

Post count: 28

Hi Calin, it kinda worked but for some reason the font is too big (https://drive.google.com/file/d/180o1Mng9Ch-YM5p_JZOcKugvO_9nAEPb/view?usp=sharing)

See this one for comparison: (https://drive.google.com/file/d/1j_gFt97a0mi9KRlr4LLICEFboPAO5W8o/view?usp=sharing)

I’ve compared the code you sent with the one on Style.css just to make sure the values were the same, and they are alright. Then I tried to change some values (on the Custom CSS code you wrote above) but it didn’t took effect on the size of the this big dropcap, so I don’t know why the letter is so big when compared to the regular dropcap. For further explanation: the first picture with the “O” is with the custom css, and the one with the “K” is the regular.

Post count: 35449

Hi,
I think that you can add an extra class and then the code provided will apply. For example set the “.single” class in front of the “p.has-drop-cap:first-letter” then the font-size will apply -> https://i.imgur.com/0VEjCV8.png
I hope this will help!
Thank you!

Post count: 28

Thank you very much! It’s working perfectly now 🙂
I’ll leave here the final code just in case someone else reads this topic and needs it too: https://pastebin.com/Q4JxM4Xa

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.