Created
January 27, 2020 21:10
-
-
Save dancameron/fe491f1669d342ba75effdb19582bd19 to your computer and use it in GitHub Desktop.
Custom PDF CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // don't include this line in your functions.php, since it already starts with it. | |
function _custom_si_pdf_service_scripts( $old_scripts_and_styles ) { | |
$scripts_and_styles = $old_scripts_and_styles; // remove this line if you don't want to remove the default styling and scripts | |
ob_start(); // place your custom styles and javascript below ?> | |
<style type="text/css"> | |
body.si_default_theme header#header { | |
background-color: #87d57c; | |
} | |
body.si_default_theme .title, body.si_default_theme #intro .inner .column span, body.si_default_theme #notes .item .header h3 { | |
color: #fff | |
} | |
</style> | |
<?php | |
$scripts_and_styles .= ob_get_clean(); | |
return $scripts_and_styles; | |
} | |
add_filter( 'si_pdf_service_scripts', '_custom_si_pdf_service_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment