Skip to main content
WWowFreeFonts

WordPress Google Fonts Snippet

Copy-paste PHP + CSS to enqueue any Google Font in your theme.

Runs entirely in your browser — no upload, no registration.

functions.php

add_action( 'wp_enqueue_scripts', function () {
  wp_enqueue_style(
    'google-fonts-inter',
    'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap',
    array(),
    null
  );
} );

style.css

body { font-family: 'Inter', sans-serif; }

What this tool does

Generates a wp_enqueue_style call and matching CSS for your chosen font and weights.

Why you might need it

The recommended WordPress way to load web fonts without a plugin.

How to use it

  1. Pick a font and weights.
  2. Copy the PHP into functions.php.
  3. Copy the CSS into style.css.

Always review the included licence before commercial use. Do not remove copyright records, designer names, licensing metadata or embedding restrictions from any font you process.