Skip to content

Instantly share code, notes, and snippets.

@alexwcoleman
Created September 7, 2023 17:22
Show Gist options
  • Save alexwcoleman/f318cf16b73c1d550e7bf1ddd99e2773 to your computer and use it in GitHub Desktop.
Save alexwcoleman/f318cf16b73c1d550e7bf1ddd99e2773 to your computer and use it in GitHub Desktop.
Google Fonts in GiveWP Multi Step Form
<?php
/**
* The multi-Step form template and the donor dashboard load in an iframe, which prevents theme styles from interfering with their styles.
* To style them, use this PHP snippet to add inline styles. Replace lines 16-26 with your custom styles.
*/
function override_iframe_template_styles_with_inline_styles_google() {
wp_enqueue_style( 'give-google-fonts', 'https://fonts.googleapis.com/css2?family=Nunito:wght@200&display=swap', false );
wp_add_inline_style(
/**
* Below, use 'give-sequoia-template-css' to style the Multi-Step form template,
* 'give-styles' to style the donor dashboard, and 'give-classic-template' to style the Classic template
*/
'give-sequoia-template-css',
'
/* add styles here! A sample (turns the headline text blue): */
* {
font-family: Nunito;
}
'
);
}
add_action('wp_print_styles', 'override_iframe_template_styles_with_inline_styles_google', 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment