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?
- Capture the Selected Radio Button Value between two files in wordpress theme
- Hide wordpress field if data is empty in post!
- Adding country tags automatically
- write custom woocommerce templates and forms
- Implement toggle switch for theme options in settings API
- Change the site tagline (or similar) based on current page
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- Setting custom canonical urls
- Using a variable in is_page(array())
- Trigger popup in a php if/else statement
- Anyway to output the registration form like the login form with wp_login_form()?
- How do I get current page ID in WordPress customizer file?
- Only show search results with if current date is between two dates?
- database interactions using OOP
- How to load a template-part based on a url wildcard?
- How to add just one specific page to widget without plugin?
- Remove one value in dismissed_wp_pointers?
- WordPress does not load page.php, return 404.php
- create a select input with menus created on a custom options page
- Taxonomy linked to pages
- How can i upload images in an admin page?
- Where to edit the template that is generating the code for dynamic_sidebar left-sidebar in the Understrap theme? [closed]
- Multiple WordPress Menus that will only display all pages
- Set the checkbox as checked by default at options page
- Add child pages of parent to navbar PHP
- How can I create a list of page titles from custom meta values?
- Load a page into a div with Ajax
- Accessing data from a non-WP database/table within a page content
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- WordPress blog post url on category page
- Theme Options Page – User Updates Logo
- Changing layout with wp_customise
- WP dynamic featured image – Can’t get second featured image url
- Extending the WP_Widget_Text class
- How to use my style.css file outside of wordpress subdomain?
- How to show part of the_content?
- Wp-login appears White Screen, Error: Cannot modify header information
- How to remove the cufon script from Dzonia Lite theme [closed]
- get_the_tags() not iterating through for/while loop, but will with foreach
- Selectbox in admin panel function linking to CSS
- Can I install/embed WordPress on a ‘single page’?
- Hide categories that are not used in the post type
- How do I add custom bulk actions to multiple custom post types?
- Add_action not working in required file of functions.php
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- How to check if a meta value has already been assigned to any user?
- How to hide products that do not have an image from a slider carousel for an ecommerce webpage?
- adding custom user input fields in WordPress admin dashboard gives error The link you followed has expired. Please try again
- what is the best practice to add new field to an api route
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Grab posts by multiple categories
- Can’t access variable outside for loop
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- add custom link to wordpress media gallery modal
- Trying to build simple deposit code that hooks into woocommerce
- Need Help Fixing My Iframes [closed]
- How to pick the default selected value in wordpress dropdown?
- Avoid parallax images hardcoding
- Improve page speed loading using CDN and async or defer attribute
- Add New User, extra fields which are required?
- user_profile_update_errors hook not executing
- Send an email to specific adress when button is clicked?
- populate form fields in a loop with ajax
- Error in custom php function doesn’t exist
- Saving and Restoring a Canvas on A Individual User Basis
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP