Archived topic
Is there an easy way to use an accent font?
1 reply · Started by Jessica on January 24, 2022
I'm trying to use a script font as an accent font in a few places on a website -- I don't want to tag it H5 or H6 (rarely used so in theory they're available) because of accessibility issues, so I'm wondering if I could create a P1 and P2 with two different styles but both are tagged paragraph text and then it could be selected from the Headline block itself. I'm looking for a way like H2/H2/P etc. where I could style the font in the Customizer and then have the client just select P2 for example from the dropdown when they want a piece of text to be styled like that.
I tried adding it in the Typography Manager as Other but not sure how/where that would play in on the site - can I create content with "Other" and tag it however this font is managed in the Typography Manager?
Apologies if this isn't clear, happy to share more explanation if needed. Thanks!!
Hi Jessica,
I'm not sure I fully understand your question, are you trying to target some specific text to use a specific typography?
If so, you can try adding an additional CSS class to the text blocks, eg. p2.
This article explains how to add additional CSS class to WP blocks: https://wordpress.com/support/adding-additional-css-classes-to-blocks/
Then go to customizer > typography > Typography Manager, use the custom selector:
Please watch the video in the article (from 3:30) https://docs.generatepress.com/article/dynamic-typography-overview/
You can use .p2as the custom selector to set the specific font/typography for it.
Let me know if I miss anything :)