[Resolved] Local Fonts and ttf

Home Forums Support [Resolved] Local Fonts and ttf

Home Forums Support Local Fonts and ttf

  • This topic has 18 replies, 2 voices, and was last updated 4 years ago by Tom.
Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #1194041
    Tom
    Lead Developer
    Lead Developer

    You need to make sure you use the full URL to the file.

    If Open Sans is rendering as Helvetica, it means something is wrong with the font file/@font-face declaration.

    #1194106
    Paul

    Hi Tom, you are again quite correct. Embarassing this – but the name of the folder inside /fonts was missing. I have added the final folder name of the path to the url and all is well.
    Just need to work out how to make the test page pick up the styles from style_test.css
    Thank you for your persistence and patience, Paul

    #1194222
    Paul

    This code has worked well to introduce the second stylesheet style_test.css

    /* add link to stylesheet to the head section */
    add_action( 'wp_enqueue_scripts', function() {
    		$child_folder = trailingslashit( get_stylesheet_directory_uri() );
    		wp_enqueue_style( 'style', $child_folder . 'style_test.css' );
    	} );

    If I may I will start another topic as I am not sure how to make this only load for one page
    thank you, Paul

    #1194292
    Tom
    Lead Developer
    Lead Developer

    Glad you got it working! 🙂

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.