• Trying to edit a section on code in header.php and it’s making me want to bang my head on the desk… repeatedly.

    I’m trying to get the feature area/slider to show up on all pages, not just the home page. I’m pretty certain that it’s within this area of code:

    <?php if(is_front_page()) : ?>
    <script type="text/javascript">
    $(document).ready(function() {
    <?php if(get_wizyslider() == '3in1') : ?>
        $('#slider .slider_pane.first').cycle({
    		fx:      '<?php wizyslider('effect'); ?>',
    		speed:    <?php echo get_wizyslider('anmiation_speed') - 500; ?>,
    		timeout:  <?php wizyslider('delay'); ?>
    	});
        $('#slider .slider_pane.second').cycle({
    		fx:      '<?php wizyslider('effect'); ?>',
    		speed:    <?php echo get_wizyslider('anmiation_speed') + 500; ?>,
    		timeout:  <?php wizyslider('delay'); ?>
    	});
        $('#slider .slider_pane.third').cycle({
    		fx:      '<?php wizyslider('effect'); ?>',
    		speed:    <?php wizyslider('anmiation_speed'); ?>,
    		timeout:  <?php wizyslider('delay'); ?>
    	});
    <?php elseif(get_wizyslider() == 'nivo') : ?>
    	$("#slider").nivoSlider({
    		effect: '<?php wizyslider('effect'); ?>',
    		slices: <?php wizyslider('num_slices'); ?>,
    		animSpeed: <?php wizyslider('anmiation_speed'); ?>,
    		pauseTime: <?php wizyslider('delay'); ?>,
    		directionNavHide: true,
    		pauseOnHover: true,
    		controlNav: false,
    		captionOpacity: 1,
    		keyboardNav: <?php wizyslider('keyboard_nav'); ?>
    	});
    <?php elseif(get_wizyslider() == 'coin') : ?>
    	$("#slider").coinslider({
    		width: 940,
    		height: 450,
    		spw: <?php wizyslider('width_squares'); ?>,
    		sph: <?php wizyslider('height_squares'); ?>,
    		delay: <?php wizyslider('delay'); ?>,
    		sDelay: <?php wizyslider('anmiation_speed'); ?>,
    		opacity: 1,
    		titleSpeed: 500,
    		effect: '<?php wizyslider('effect'); ?>',
    		links : true,
    		hoverPause: true
    	});
    <?php endif; ?>
    });
    </script>
    <?php endif; ?>

    I’ve tried changing the first line in a variety of ways, but to no avail. Any suggestions on what edits I can make so that it shows up on all pages?

    Thanks in advance for any help you can provide! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The problem is the very first line that you posted…. The if statement that checks to see if the current page is the front page. Remove that if statement, and you should be good to go.

    Thread Starter AVirtualEdge

    (@avirtualedge)

    Hey JPry! Do I need to take out an end if statement as well? I’m a complete PHP noob 🙁

    Would the first line be as simple as: <?php and then changing the corresponding end if to ?>

    Apologies in advance if this is kind of a basic question.

    in your case this means to remove the full first
    <?php if(is_front_page()) : ?>
    and last
    <?php endif; ?>
    line of your code snippet;

    just leaving everything from <script to </script> (both inclusive).

    Thread Starter AVirtualEdge

    (@avirtualedge)

    That worked 🙂 There was also another place in the code where I had to change it… but now I can stop beating myself up about it.

    Thanks to you both for the help! Your time is very, very much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Feature Area in Header.php’ is closed to new replies.