I'm trying to modify the header in a theme for two specific custom post type. The header for all theme page is output from this code:
<script>
jQuery(function($){
$('.parallax-window').parallax({imageSrc: '<?php echo $ilgelo_options['ilgelo-parallax-image']['url'];?>'});
});
</script>
I've tried to put my condional code:
<?php if ( is_singular( array( 'rivista', 'rivista-trimestrale' ) ) ) {
<script>
jQuery(function($){
$('.parallax-window').parallax({imageSrc: '<?php echo $ilgelo_options['ilgelo-parallax-image']['url'];?>'});
});
</script>
} else {
<script>
jQuery(function($){
$('.parallax-window').parallax({imageSrc: 'STYLESHEETPATH."/img/header-rivista.jpg"'});
});
</script>
}
?>
but I get a syntax error '<' and I can't understand why. Could someone help me please? Thanks.