- This topic has 13 replies, 3 voices, and was last updated 6 years, 6 months ago by
David.
-
AuthorPosts
-
July 15, 2019 at 5:33 am #958211
Ravi Dixit
I was using different font when started my blog but now I am using another as I changed the theme to GeneratePress.
So, my new post having different font and old are having different. Some having a different font and some having the same font but different font size.
How can I make all post having the same font and font size, I don’t want to change the font of heading instead just want to change the font of paragraphs.
July 15, 2019 at 9:19 am #958482Leo
StaffCustomer SupportHi there,
The post body font simply inherits the settings under Typography > Body.
If there are certain paragraphs that don’t work, it’s likely that there are extra CSS or HTML inline style added that needs to be removed.
If this is not clear, can you guide me to a post and section where I can see the issue?
Let me know 🙂
July 15, 2019 at 10:37 am #958568Ravi Dixit
The typography in the customize section is already set as I want for all the post.
But when I was not using GeneratePress in my initial days, I used to TinyMCE plugin to customize font and font size for each post.
Is there any CSS I can use…
July 15, 2019 at 10:38 am #958570Leo
StaffCustomer SupportThat depends.
Can you guide me to a post and section where I can see the issue?
July 17, 2019 at 7:27 am #960133Ravi Dixit
Here is the example of the post having different font https://www.staymeonline.com/tricks-you-should-know-for-affiliate-marketing/
July 17, 2019 at 9:23 am #960377Leo
StaffCustomer SupportIt’s added as HTML inline style so it’s not possible to overwrite using CSS unfortunately:
https://www.screencast.com/t/xEWfRVKfYou will need to manually remove that.
July 17, 2019 at 12:06 pm #960521Ravi Dixit
Okay, thanks for the help…
July 17, 2019 at 12:11 pm #960526Leo
StaffCustomer SupportNo problem 🙂
September 20, 2019 at 11:22 pm #1014980Ravi Dixit
Hello, LEO!
As you know, some post has custom inline HTML added…
How can I change all post font to make same at once?
September 21, 2019 at 5:44 am #1015120David
StaffCustomer SupportHi there,
the only way to overwrite inline styles is by the use of important eg.
span { font-size: 20px !important; }You would need to target any and all elements that use inline styles in this way.
September 21, 2019 at 6:37 am #1015153Ravi Dixit
Thanks, David!
It is hard for me to understand, Can I make it simple?
September 21, 2019 at 6:51 am #1015160David
StaffCustomer SupportWhen adding styles using Tiny MCE it wraps the content in a span tag where the inline styles are added so this:
<h2>A title</h2> <p>body text</p>becomes:
<h2><span style="font-family: georgia, palatino, serif; font-size: 18pt;">A title</span></h2> <p><span style="font-size: 14pt; font-family: georgia, palatino, serif;">body text</span></p>So you have to target each of those Elements eg. p span, h2 span and override the inline CSS using !important.
e.g Changing all of those spans font-family:
p span, h2 span, h3 span, h4 span { font-family: "Alegreya Sans" !important; }Then you will need to set there font sizes individually eg.
p span { font-size: 24px !important; }September 21, 2019 at 7:52 am #1015278Ravi Dixit
Understood!
But I don’t want to change using CSS, Because It will create the same issue in future.
Is there any way I can remove all those TinyMCE custom HTML?
September 21, 2019 at 7:57 am #1015282David
StaffCustomer SupportYou would have to search and replace them in your SQL Database. Not something within our scope.
-
AuthorPosts
- You must be logged in to reply to this topic.