• Resolved ais222

    (@ais222)


    I would like to have users come to the single page (single.php) to view articles, and then to click on a link to another single page that allows them to view the page with a different layout. This would be used in my theme to support print previews.

    How do I create the additional single post page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Why not use a “print this” plugin? like WP -PRint
    https://lesterchan.net/portfolio/programming.php

    Thread Starter ais222

    (@ais222)

    I ended up using the print this plugin. It is EXTREMELY helpful. Thanks for your input.

    For future users, here is how I did it:

    I wanted ONLY the div tag layer7 to print. I put this text in an a href link on my single post page : PrintThisPage();

    I then added this to the header.

    function PrintThisPage()
    {
    var sOption=”toolbar=yes,location=no,directories=no,menubar=yes,”;
    sOption+=”scrollbars=yes,width=750,height=600,left=100,top=25″;

    var sWinHTML = document.getElementById(‘layer7’).innerHTML;

    var winprint=window.open(“”,””,sOption);
    winprint.document.open();
    winprint.document.write(‘Title of your print preview’)
    winprint.document.write(sWinHTML);
    winprint.document.write(‘</body></html>’);
    winprint.document.close();
    winprint.focus();
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create two single page templates for print preview’ is closed to new replies.