Knowledge Base
How to Add Google Fonts to Print View
This can be changed with a function and some css added to the Custom Coupon Styles Field.
The first step is to find the Google Font your would like to use.
This case will use Open Sans for the body font and Oswald for the H tags.
In Google Fonts look for the standard embded code for each font and using this hook it will load in the print view:
/* * Coupon Creator - Add Google Fonts to Print View * Version 2.1.2 */ add_action('coupon_print_meta', 'cctor_google_fonts_print_view' ); function cctor_google_fonts_print_view() { echo "<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>"; echo "<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>"; }
Adding that coding to a custom plugin or to your child theme’s function.php:
The second step is to add the css to use the fonts in the Print View.
Go to the Coupons Options Page here:
Your Admin > Coupons > Options > Display Tab > Custom Coupon Styles
Then add the following to the field:
body.print_coupon { font-family:'Open Sans',sans-serif; } .print_coupon h1, .print_coupon h2, .print_coupon h3, .print_coupon h4, .print_coupon h5, .print_coupon h6 { font-family:'Oswald',sans-serif; }
Reload your print coupon and you will see Oswald for the h tags and Open Sans for the text. You can use this with any combination of Google or any other fonts.