Different CSS style depending on document type

[ad_1]

Hello,

I am trying to use different CSS files depending on document type, for example if document is an invoice it will use “style_invoice.css” but for packing slips it will use “style_packing.css”.

I know it can be possible with snippets, but I want to code it within template files.

So in my template folder, inside “html-document-wrapper.php” file I have removed this line :

<style type="text/css"><?php $this->template_styles(); ?></style>

and added instead :

<?php if ($template_type == 'invoice') { ?>
	<style type="text/css"><?php include './style_invoice.css'; ?></style>
<?php } ?>

But this do not work, any idea how to achieve this ?

Thanks for your help.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer