Using @import is the way to go, you can do something like this on your stylesheet:
@font-face {
font-family: FontName;
src: url(public_html/your-site/wp-content/themes/your-theme/fonts/FontName-Regular.ttf);
font-weight: normal;
}
Then you simply use it as usual.
p {
font-family: FontName;
}
Related Posts:
- Why have on every line
- Function to return true if current page has child pages
- Include a external PHP file into a WordPress Custom Template
- List of all theme customizer control types?
- Get author full name
- How to remove hardcoded characters from playlists?
- is there a simple way to list every templates / php files used to generate a specific page?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Widgets not showing in my custom theme
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- Displaying theme options in css
- Customizer: Output default value in Customizer CSS
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Converting HTML Template to WordPress Theme
- Customizer: active_callback and sanitize_callback incompatibility?
- Menu jumping when calling it via PHP
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Is there a hack for using is_page() within the function.php file?
- pass html code to worpdress
- How to get php file based on URL in WordPress
- How can I customize a WordPress theme before it’s downloaded?
- Where can I find the declaration of `$_wp_theme_features`?
- Display tab title as ‘blog tagline | blog title’
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to add button to top of theme customizer?
- Need help setting default setting value for radio button in theme customizer
- Add a wp editor to custom plugin and save data
- How to Use the Function is_user_logged_in To Display Different Menus?
- Add value to usermeta without removing previous values?
- Removing unnecessary wordpress files
- String replace WordPress Site Title
- WordPress loop specific thumbnail size
- Passing array in add_option()
- How to make thumbnail image fit into a div where image dimentions are completely different?
- PHP can I add line numbers to file_get_contents()
- write custom woocommerce templates and forms
- Remove one value in dismissed_wp_pointers?
- Selectbox in admin panel function linking to CSS
- what is the best practice to add new field to an api route
- Grab posts by multiple categories
- Add New User, extra fields which are required?
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- custom url rewrite for wordpress
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- Output Video Download Link in template
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- “operation successful” message
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- Theme not calling Jquery properly
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- How to create a field in customize and show that in header.php?
- Get post categories
- Output only links using wp_nav_menu()
- How to add aria role and schema markup to custom walker container
- jQuery accordion menu
- Removed jQuery script from header.php , any problems?
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- is_user_logged_in returning nothing on custom page
- Customize field names in backend profile edit page through function.php [duplicate]
- Trying to change featured image from 180×180 to full width on home page
- Remove the Tag from wp_nav_menu
- how to add datas in taxonomy to post with wp_insert_post
- WordPress redirects page query parameter in URL
- Getting text from custom field from customizer
- WordPress navigation wont appear with wp_head
- Change permalink structure specific category
- Need help for some PHP code
- How do you get the current post taxonomy so I can get the current post taxonomy? into a variable to THEN loop through all post with that taxonomy.,
- I need to display posts in subcategory beside posts in main category
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- Add a new view on the Woocommerce account page
- Rename a folder via HTML POST request
- How do I add a predefined class to a custom html element?
- Submit remote form to wordpress REST API and save data to custom post type
- alternate left – right content inside the loop
- Add a custom link to each image in WordPress gallery
- How to separate the taxonomies list from the form so that editing taxonmies is the same as pages and posts?
- Collapsible menu on post sidebar only expands and does not collapse
- Redirect user role to a specific page on login in a multisite network?
- Remove node from multisites?
- custom field – changing an element or background of id div – different versions not working
- Woocommerce variable products are being added to the card on the homepage (ajax)
- I want different post-thumbnail size depending on media size
- Why isn’t my custom Javascript showing up in my custom template?
- Create a custom theme-specific page, invisible in the admin-panel?
- Image not displayed
- Where can I find the code for the menu page meta boxes?
- Adding code to the function file
- Post thats in Two Categories, only want to display name for one
- wp_head makes my custom page template not work in Customizer?
- Woocommerce linking variations
- paginate_links() returns NULL instead of the pagination links, but pagination is actually happening
- PHP warning: Undefined array key 2 in feed.php
- How to continuously developing a WP site that is already deployed in production without damaging it during development