Skip to content

Instantly share code, notes, and snippets.

@robneu
Last active February 10, 2017 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robneu/e10f39ee62358b68e171235503491dd3 to your computer and use it in GitHub Desktop.
Save robneu/e10f39ee62358b68e171235503491dd3 to your computer and use it in GitHub Desktop.
Add custom inline styles to the Cookbook print/print preview.
<?php
add_action( 'cookbook_recipe_print_head', 'prefix_cookbook_inline_print_css', 99 );
/**
* Inline custom print styles in the Cookbook print head.
*
* @since 1.0.0
* @access public
* @return void
*/
function prefix_cookbook_inline_print_css() {
?>
<style>
.cookbook-recipe-print-body {
font-size: 14px;
}
.cookbook-nutrition {
page-break-before: avoid;
}
</style>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment