In the plugin settings, under the “Custom CSS” tab, there is a space for print sheet rules.
Sorry, but obviously my re-translation of “Custom CSS” into “own css” was wrong.
But:
My css-rules in “Custom CSS” / “space for print sheet rules” are not executed. When I put in in my custom template (adapted from https://xnau.com/using-the-pdb_template-helper-class-in-a-custom-list-template/) after
<?php // this is an example of a way to style the records, delete this or edit as needed ?>
<style type="text/css">
section {
margin: 1em 0;
}
they are executed…
The rules are:
@media print {
h1,
h2,
h3,
h4,
h5,
.site-header,
.widget_template_part,
.template-part-site-branding,
.template-part-main-nav,
.entry-header,
.page-header,
.entry-title,
.page-title,
.print-link {
display:none !important;
width: 0 !important;
height: 0 !important;
overflow: hidden !important;
line-height: 0pt !important;
white-space: nowrap;
}
}
What is the explanation?
Thank you
Those CSS rules are probably added by your WP theme. In the HTML inspector, it will tell you the source of the CSS rules.
It’s the same situation with the themes Twenty8teen and Twenty Sixteen… Both themes have media query (@media print {…}) in their style.css. The rules work in the custom template but not in the Custom CSS of the plugin.
If the theme is adding CSS rules that you don’t want, you need to add CSS that overrides them in the custom CSS.