WordPress.org

Ready to get started?Download WordPress

Forums

Blue Planet
Printing blog, prints out all links in url (12 posts)

  1. annettep2014
    Member
    Posted 5 months ago #

    Hi,
    When I print any post from my blog, all my links' urls are printed out next to the word in brackets. Also the background color of my header doesn't print out. How do I get my posts to print out as I see it on the screen?

    This is the blog: http://www.workhealthsafetyblog.com.au/

    Thank you

  2. Adrian Houle
    Member
    Posted 5 months ago #

    Not sure what you mean, do you have an example? Can't inspect what's going on without an example of the culprit.

  3. annettep2014
    Member
    Posted 5 months ago #

    sorry,
    here is a scanned image of a print out of the home page:
    http://i92.photobucket.com/albums/l16/anetpham/img-319084725-0001.jpg

    i hope this helps,
    thank you

  4. Adrian Houle
    Member
    Posted 5 months ago #

    Oh I did not realise you meant literately print. I don`t know, the only thing I could find was to make sure you do a print preview witch should make the page into an image before printing, instead of sending all the html to a printer and hoping nothing screws up.

    Were you already doing that or did this solve it

  5. stephencottontail
    Member
    Posted 5 months ago #

    The theme calls in css/bootstrap.min.css, which contains a @media print query that affects how the page looks when it's printed. Unfortunately, the theme relies on a lot of the styles defined in that file, so it's not as simple as not loading that file. I'm trying to think of the easiest and least error-prone ways of dealing with this.

  6. Adrian Houle
    Member
    Posted 5 months ago #

    Based on the observations of Stephen I was able to find this possible solutions: http://drupal.stackexchange.com/questions/59900/how-to-get-rid-of-added-urls-when-printing-a-bootstrap-themed-page

  7. annettep2014
    Member
    Posted 5 months ago #

    Hi guys, thank you for the response
    Adrian: looking through the link, i applied the bit to my style sheet but it still printed out the urls and changed the look of the blog.
    having done more research, i think a print style sheet needs to be created.
    does anyone know how to do so?

  8. Adrian Houle
    Member
    Posted 5 months ago #

    I noticed in this article on how to make print style sheets, it shows how to make it so that links appear, witch is the oposit of what you want, but that might lead to you figure out how they did it and overwrite it.
    http://css-tricks.com/css-tricks-finally-gets-a-print-stylesheet/

    "4. Display the URLs in the body content
    [Thanks to David Walsh for this idea] Links in your content don't do any good on the printed page. It would be pretty cool if you could just tap the linked word with your finger and it would open the webpage on your computer, but thats something I haven't even seen in the movies yet. For now, we can just use CSS pseudo class ":after" to drop in the URL right next to the link, using the content attribute. IE doesn't support it, but c'est la vie."

  9. stephencottontail
    Member
    Posted 5 months ago #

    @annettep2014: How did you add that code to your stylesheet? Did you edit the main theme's style.css directly (you shouldn't do that, but that's not important right now) or did you get a custom CSS plugin or did you do something else?

  10. annettep2014
    Member
    Posted 5 months ago #

    @stephencottontail: I added the code into blue planet's custom css, but it changed the look of the blog. I then added it to the end of the style.css, which did nothing

  11. stephencottontail
    Member
    Posted 5 months ago #

    Okay. What happens if you put this instead:

    @media print {
    	#page a[href]:after {
    		content:none;
    	}
    }
  12. annettep2014
    Member
    Posted 5 months ago #

    Yes! Thank you that worked!

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.