Skip to content

Instantly share code, notes, and snippets.

@danielpost
Created February 9, 2021 22:24
Show Gist options
  • Save danielpost/75a83de74a87a512f2e1cfd8fc7a2cc3 to your computer and use it in GitHub Desktop.
Save danielpost/75a83de74a87a512f2e1cfd8fc7a2cc3 to your computer and use it in GitHub Desktop.
Social Image Generator - Custom font
<?php
add_filter( 'sig_template_font_file', function ( $path, $context ) {
if ( $context !== 'title' ) {
return $path;
}
return 'path/to/font.ttf';
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment