How to customize css not to print links as urls?
-
I am using The Truly Minimal theme. When I print a post, everything inside the tag is printed. How do I stop this? I think it is related to CSS. Where is the CSS and how can I change it? I bought Custom Design already. I also like to change the title font size, margin etc.
Note: I first posted this to the general forum: https://en.forums.wordpress.com/topic/how-to-customize-css-not-to-print-links-as-urls?replies=5#post-1479716
The blog I need help with is: (visible only to logged in users)
-
Hi,
can you try this bit of code in your custom css panel:
@media print { .entry-content a[href]:after, .entry a[href]:after{content:" (" attr(href) ")"; display: none !important;}}Go to your website and refresh your cache
(ctrl+F5 in win, apple/cmd+R on mac)
Let me know if this works,rgrds~
-
-
Hi there,
did you copy-paste the code above?
I’ve checked your custom css and it seems you are missing a “;” after the following bit.entry a[href]:after{content:" (" attr(href) ")"cheers~
-
Great, thanks. I don’t know how I missed that “;” but I copied and pasted the code again and now it is working.
I also tried to add “font-size:12pt” but couldn’t make it work. How can I play with font size, line height and margins, or title fonts etc.? I found this page http://codex.wordpress.org/Styling_for_Print but it is for WordPress.org. Is there a page like that for WordPress.com? Thanks, again.
-
Make sure to include your CSS rules for print between the print query,
An example for the font size and line heights of paragraphs with what we have added:@media print { .entry-content a[href]:after, .entry a[href]:after { content:" (" attr(href) ")"; display: none !important; } /*add your custom print rules under this comment.*/ p { font-size:12pt; line-height:1.6em; } }I haven’t seen a page like the one you are referring to for WP.com.
It’s a good reference point to observe the structure of a print style, though.Not wanting to disappoint but in honesty I think print styling is an advanced and specific topic: the understanding of CSS+HTML properties and their relationship is paramount and perhaps out of the scope of the “Custom Design” module offered on WP.com
-greetz~
-
- The topic ‘How to customize css not to print links as urls?’ is closed to new replies.