Sebastian
Forum Replies Created
-
Awesome! Now it’s working!
Thank you Ben for your great support!Is there a roadmap for Kadence Blocks (Pro)?
I’m thinking about getting the Pro Blocks, or even the full membership.
What is there to expect in the near/far future?Thanks again
SebastianHi Ben,
in my child themes functions.php I’m adding my editor script like this:
// WP - ADD EDITOR SCRIPTS function ic7_add_editor_scripts() { wp_enqueue_script( 'editor-script', get_stylesheet_directory_uri() . '/_/js/editor-script.js'); } add_action( 'enqueue_block_editor_assets', 'ic7_add_editor_scripts' );
The editor script looks like this:
// REPLACE KADENCE FONTS const { addFilter, } = wp.hooks; function replace_kadence_fonts( options ) { const custom_fonts = [ { type: 'group', label: 'Custom Fonts', options: [ { label: 'Custom', value: 'custom', google: false }, ], }, ]; return custom_fonts; } addFilter( 'kadence.typography_options', 'example/replace_fonts', replace_kadence_fonts );
Thanks for the input!
Including this script will return the following error:
Uncaught TypeError: Cannot destructure property ‘addFilter’ of ‘undefined’ or ‘null’.
at editor-script.js:3I’m sure I’m doing something wrong here. I’m not that deep into JS I must admit.
Hi Ben, thanks for the quick reply!
I’m using GeneratePress as my base theme with the GP Premium addon.
I registered my local fonts and I can use them inside the customizer. With the font settings provided by the GP Premium plugin I can set all my default font settings. These settings are also reflected in the Gutenberg editor via editor-styles.
So far so good. Now, I’m looking for a way to be able to have my local fonts also listed in the Kadence Blocks Font Family Settings. I want to be able to set my local fonts as the default font families, to than be able to sometimes overwrite the font settings made in my theme font settings. In a second step I would like to completely remove all Google Fonts, so only local fonts are available in all dropdowns.It would be great if you could help me to accomplish that!