This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Print page code

  • Creator
  • #2071

    I want to make buttons wich prints the page. Is there a WordPress or theme specific code for this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #2080
    Jason Bobich

    You’d need to get some sort of plugin. I think if you search over in the Plugin repo, you can find a lot of free things you could try.


    I have had some success with with another theme but in the end I did it myself based on Print code from HTML5Boilerplate And last week i ripped out a similar snippet from I dont know where. Preparation for jumpstart printing. Cant be bothered to test as it is no fun. Like you I will need to make own “template”.

    /* =Print media= 
    		------------------------------------------------- */
    @media print {
    	* {
    		color: black            !important;
    		background: transparent !important;
    		text-shadow: none       !important;
    		box-shadow: none        !important;
    		border: none            !important;
    		float: none             !important;
    		clear: none             !important;
    	html, body, article, header, section, footer, aside, div { width: 100% !important; }
    	a, a:link, a:visited, a:hover, a:active, abbr, acronym {
    		text-decoration: none;
    		border-bottom: 0 none; }
    	h1, h2, h3, h4, h5, h6, p, li {
    		page-break-inside: avoid;
    		orphans: 3; widows: 3; }
    	h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
    	thead   { display: table-header-group; }
    	tr, img { page-break-inside: avoid; }
    	nav     { display: none; }

    I dont think Bootstrap has any.

    So simply a media query but not CSS3, goes way back Way better method than external CSS file – but also painful to set up. Takes some time to tear down pages – and test over and over. Print preview is ok but you really need real print to be sure.

    • This reply was modified 9 years, 8 months ago by karlo.
    • This reply was modified 9 years, 8 months ago by karlo.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.