Hey, @jran , I would recommend looking at a CSS tutorial to understand the background about this a bit more (some themes do have the option to customize the font within the “Customizer” window as one of the menu options, but since I don’t know the theme, you’re using, I’m recommending this method detailed below): https://themeisle.com/blog/css-in-wordpress/ .
In any event, if you wanted a style for the paragraph font across the entire website, then based on the example you provided the code would be :
p
{
font-size: 14px; font-family: "Book Antiqua";
}
(Note that this is basic in that another style that happens to have the same selector, p, could potentially overwrite the rule. See https://www.w3schools.com/css/css_specificity.asp for additional details.)
You could place the code within the “Additional CSS” menu option from the “Customizer” interface.
Thread Starter
jran
(@jran)
Hi Ian – thanks so much for your reply.
Will definitely check out those CSS tips, however perhaps even more than that was wondering how to simply change the default font/size for a paragraph? So for example, when writing a blog post or page, how to set it to where each paragraph’s font wouldn’t have to be manually changed. Is there a way to do this without adding code?
I’m currently using the TinyMCE plugin, which does enable decent font customization, but requires manual changing not just in every block, but in every new paragraph. As you can imagine gets pretty tedious. Appreciate your help!
Thread Starter
jran
(@jran)
Hi @plantprogrammer – forgot to mention that I’m using the Kale theme. There appears to be a way (in customizer) to change the default font family for paragraph, headings etc, but not the size?
Would be great if there’s a way to change the size without adding CSS, or even needing to mess with TinyMCE plugin…but if I were to add code, it’s not something that’s gonna break the site or cause further problems down the line right? Also, wanted to make sure I can remove the code and revert back to previous form? Anyway, thanks for your help.
Hey, @jran , I’ll respond to your concerns:
but if I were to add code, it’s not something that’s gonna break the site or cause further problems down the line right?
CSS is only responsible for the appearance of the site, styling. You wouldn’t have to worry about the site breaking because of CSS (as an aside: PHP and JavaScript coding issues will potentially cause things to not work as intended, but you wouldn’t need to worry about that when dealing with CSS stuff).
Also, wanted to make sure I can remove the code and revert back to previous form?
Yep, you can always edit/remove/add CSS without worrying about your previous code.
Adding the code through the Customizer interface allows you to preview the CSS before applying it to your site. Just add the code in the “Additional CSS” section without hiting the blue “Publish” button and you’ll see how the CSS will be applied.
Thread Starter
jran
(@jran)
Hey @plantprogrammer – thanks again for the tips. I will play around with the CSS then, seems like that’s the best way to apply a global font change for paragraphs…
One question I had though, was will this ensure that it becomes the *default* new font for all future new paragraphs? Whether using the regular block editor or TinyMCE classic paragraph block?
Cheers
Hi again, yes, the CSS should ensure that the font should hold for all future paragraphs regardless of the WordPress editor you end up using.
As a side note, in the future, WordPress will allow you to make global style choices without CSS. See https://make.wordpress.org/design/handbook/focuses/global-styles/ for additional info.