Add css cod font to site no use add setting theme

This topic has 8 replies, 3 voices, and was last updated 1 years, 6 months ago ago by Tony Rodriguez

  • Avatar: webpars
    webpars
    Participant
    April 24, 2023 at 14:46

    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

    7 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 24, 2023 at 15:07

    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

    Avatar: webpars
    webpars
    Participant
    April 24, 2023 at 23:08

    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

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    April 25, 2023 at 05:44

    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

    Avatar: webpars
    webpars
    Participant
    April 26, 2023 at 10:36

    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

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 26, 2023 at 14:27

    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

    Avatar: webpars
    webpars
    Participant
    April 27, 2023 at 19:17

    In which section of the files should I enter the css code ?

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    April 28, 2023 at 05:49

    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

  • Viewing 8 results - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.