Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

@font-face for WordPress Question

Featured Replies

Hi :)

 

This is the CSS code in my CSS file

 

 

@font-face {
    font-family:'Raleway';
    src:url('fonts/Raleway-Regular.eot');
    src:url('fonts/Raleway-Regular.eot?#iefix') format('embedded-opentype'),
        url('fonts/Raleway-Regular.woff') format('woff'),
        url('fonts/Raleway-Regular.ttf') format('truetype'),
        url('fonts/Raleway-Regular.svg#font-name') format('svg');
    font-weight:normal;
    font-style:normal;
}


@font-face {
    font-family:'Arvo';
    src:url('fonts/Arvo-Regular.eot');
    src:url('fonts/Arvo-Regular.eot?#iefix') format('embedded-opentype'),
        url('fonts/Arvo-Regular.woff') format('woff'),
        url('fonts/Arvo-Regular.ttf') format('truetype'),
        url('fonts/Arvo-Regular.svg#font-name') format('svg');
    font-weight:normal;
    font-style:normal;
}
 

The names of my Fonts are Arvo-Regular.ttf and Raleway-Regular.otf

 

I have uploaded the fonts in this path of my server.... (fonts folder)

 

public_html/wp-content/themes/theme-name/fonts

 

Still its not working.

What I am doing wrong?

 

Will I have to rename Raleway-Regular.ttf to Raleway-Regular.otf in

url('fonts/Raleway-Regular.ttf') format('truetype'),

 

 

 

 

 

Thank you

 

Is your CSS file located in the same folder as your fonts?

 

The links to the fonts are relative, ie: If your css file is in

public_html/wp-content/themes/themename/

and you refer to a font in

fonts/font_name.tff

 

Then you path you're targeting

public_html/wp-content/themes/themename/fonts/font_name.tff

 

Make sure your paths follow logically, remembering the font path is relative to your CSS file.

  • Author

OK I will try.

Yes Css file is in Root Folder public_html/wp-content/themes/themename/style.css

 

And Fonts are in fonts folder.

public_html/wp-content/themes/themename/fonts/font_name.tff

 

So do I need to include public_html in the beginning?

 

Thank you :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.