Hi @aeiban ,
Thank you for reaching out to us! You can manually add your self-hosted fonts by editing your theme’s functions.php file. Below is the code you can use:
add_action( 'admin_footer', function() {
echo <<<JS
<script>
if ( wp ) {
wp.hooks.addFilter( 'stackable.font-family-control.options', 'my-theme', options => {
// Add custom font options
if ( ! options.some( option => option.id === 'custom-font' ) ) {
options.unshift(
{
id: 'custom-font',
title: 'Custom Fonts',
options: [
{ label: 'Your Font Name', value: 'your-font-name' },
],
}
)
}
return options
} )
}
</script>
JS;
} );
Alternatively, you can install and activate the Code Snippets plugin on your WordPress site. Once activated, you can create a new snippet and paste the above code directly into the plugin.
To prevent Google Fonts from being enqueued, you can disable this functionality by adding the following code to your theme’s functions.php file:
add_filter( 'stackable_enqueue_font', '__return_false' );
For more detailed guidance, you can refer to these documentaion:
https://docs.wpstackable.com/article/497-customizing-stackable-using-code-snippets https://docs.wpstackable.com/article/472-how-to-disable-google-fonts
Let us know if there’s anything else we can help with!
Thread Starter
aeiban
(@aeiban)
Many thanks, solved my problem perfectly !!