Julian
Julian

Reputation: 23

Wordpress custom css in head

I'm trying to add page specific css in the head. For some reason the page completely goes white when I use the code below:

<?php if (is_page(5)) {
        <style>
        </style>
    } ?>

Upvotes: 0

Views: 81

Answers (1)

Sebastian Kaczmarek
Sebastian Kaczmarek

Reputation: 8515

<style> is not right PHP syntax. Try this:


<?php if (is_page(5)) { ?>
    <style>
    </style>
<?php  } ?>

Upvotes: 1

Related Questions