Jump to content

Adding Print button to Images

Recommended Posts

  • Replies 4
  • Views 944
  • Created
  • Last Reply
On 8/30/2021 at 2:58 AM, figandlemons said:

Site URL: https://www.figandlemons.com/home/3kj5sibemefm5elkmilt736276cvxf

Hi all! 

I'm looking to add a print button to my image that will print just the image. I current have a button added using the code link javascript:window.print() but this prints the entire page when I just want to print the image. Any ideas?

Hi,

We can use some CSS to hide some elements from print page.

Your site is private. Ca nyou setup password & share url again?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
20 hours ago, figandlemons said:

Try adding to Design > Custom CSS

@media print {
    .sqs-block:not(.image-block), figcaption.image-card-wrapper {
        display: none !important;
    }
    header#header, footer.sections, .blog-item-top-wrapper, section.blog-item-comments, section.item-pagination.item-pagination--prev-next {
        display: none !important;
    }
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 9/1/2021 at 6:29 AM, tuanphan said:

Try adding to Design > Custom CSS

@media print {
    .sqs-block:not(.image-block), figcaption.image-card-wrapper {
        display: none !important;
    }
    header#header, footer.sections, .blog-item-top-wrapper, section.blog-item-comments, section.item-pagination.item-pagination--prev-next {
        display: none !important;
    }
}

 

Great! If I have multiple images in the post it will print them all. Any way I can specify one image? for example this page. https://www.figandlemons.com/home/pineapple-mango-smoothie

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.