This topic has 8 replies, 3 voices, and was last updated 1 years, 6 months ago ago by Tony Rodriguez
hi
I want to add fonts to my site with css
I don’t want to use the add theme settings
There is a css code that can add fonts to the entire site ?
Use this code in the child theme
in use style.css childs
please help me
https://xstore.8theme.com/elementor/demos/niche-market02/
use Elementor
Hello, Webpars,
Thank you for getting in touch with us.
Please describe your request in more detail, provide an example.
Thank you for your cooperation and we look forward to hearing from you soon.
Kind Regards,
8theme team
I want to add a font to the site by CSS codes
that this font is automatically loaded in all parts of my site
For example, my own font tahoma
Hello, @webpars,
To add a font to your site by CSS codes and have it automatically loaded in all parts of your site, you can use the @font-face rule to define the font family and specify the path to the font files.
Here’s an example of how to add the Tahoma font to your site using CSS:
css
Copy code
@font-face {
font-family: 'Tahoma';
src: url('path/to/tahoma.ttf') format('truetype');
}
body {
font-family: 'Tahoma', sans-serif;
}
In this example, the @font-face rule defines the font family name as ‘Tahoma’ and specifies the path to the font file (tahoma.ttf) using the src property. The format property is set to ‘truetype’ to specify the file format.
Then, the body selector applies the ‘Tahoma’ font family to the entire page, with a fallback to the sans-serif font family in case the custom font cannot be loaded.
You’ll need to replace the path/to/tahoma.ttf with the actual path to the Tahoma font file on your server. If you have multiple font files for different formats (such as .woff and .woff2), you can include them in the src property separated by commas.
Once you’ve added the CSS code to your site, the Tahoma font should be automatically loaded and applied to all text on your site.
Further, you can check here: https://www.w3schools.com/css/css3_fonts.asp#:~:text=The%20CSS%20%40font%2Dface%20Rule&text=When%20you%20have%20found%2Fbought,CSS%20%40font%2Dface%20rule.
Additionally, you can try with Xstore WordPress has a feature called “Custom Fonts” which allows you to upload custom fonts to be used throughout the site, please read and follow the instruction written in our theme documentation here: https://www.8theme.com/documentation/xstore/xstore-features/how-to-setup-custom-fonts-with-xstore/
We hope this will resolve your issue.
Best Regards,
8Theme’s Team
Hello again
I did but the font was not placed for the all site
Menus
sidebar
footer
Failed
I want to put a code css to do it for all parts of the site
Hello, Webpars,
I think your local styles are not applied because of the priority. Could you try to add !important postfix for your CSS property? More details → https://www.w3schools.com/css/css_important.asp
Also, there could be a case you need to add custom css with classes, selectors of tags for which you want to apply your font. For example:
.et-footers-wrapper, .container .etc.
Also, it is important to mention we have a Custom Fonts feature ( https://prnt.sc/RmiH52SEwopr ) if you want to use your own fonts. Uploading it once you will be able to choose it from Theme Options in all typography fields.
Best Regards,
8Theme’s Team
In which section of the files should I enter the css code ?
Hello Webpars,
We suggest that you insert the CSS code under Xstore >> Theme Options >> Theme Custom CSS >> Global CSS and it should work for your site.
Best Regards,
8Theme’s Team
Tagged: customization, font, settings, themes, woocommerce, wordpress
You must be logged in to reply to this topic.Log in/Sign up