WordPress.org

Ready to get started?Download WordPress

Forums

Spun
[resolved] completely custom font (2 posts)

  1. jessesans
    Member
    Posted 4 months ago #

    Hello,

    Hope all is well. I am looking to change the fonts to a custom font. My work in progress is http://www.jessesans.com/wordpress

    I would like to change all the fonts to FF DIN for example. I have the open type files and web fonts, but am not sure how to upload them and add the correct CSS to change the fonts from defaults to a custom font.

    Any advice would be greatly appreciated. Thank you in advance.

    Gratefully,

    J

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 4 months ago #

    If you're using Google fonts you need to enqueue the stylesheet to it in your functions.php file, e.g.

    /**
     * Proper way to enqueue styles
     */
    function custom_fonts() {
    	wp_enqueue_style( 'jim-nightshade', 'http://fonts.googleapis.com/css?family=Jim+Nightshade' );
    }
    
    add_action( 'wp_enqueue_scripts', 'custom_fonts' );

    Then use the font family in your Child Theme style.css file, e.g.

    .main-navigation a {
     font-family: 'Jim Nightshade', cursive;
    }

Reply

You must log in to post.

About this Theme

About this Topic