Static Page: Need to make some improvisation

Discussion in 'WordPress' started by FaNtEcH, Jan 29, 2011.

  1. #1
    Hey,

    I have a wordpress site and i've been using the default home page(dynamic) till now. I'm using Miland theme(check sig: Daredevils site). There is this Javascript slider in it(again see site).

    I want to use that same slider in a static web page. Is it possible?

    BTW, this is the code for the slider:


    <?php
    if(get_theme_option('featured_posts') != '') {
    ?>
    <script type="text/javascript">
    	function startGallery() {
    		var myGallery = new gallery($('myGallery'), {
    			timed: true,
    			delay: 6000,
    			slideInfoZoneOpacity: 0.8,
    			showCarousel: false 
    		});
    	}
    	window.addEvent('domready', startGallery);
    </script>
    <div class="fullbox_excerpt">
    	<div class="fullbox_content">
    		<div class="smooth_gallery">
    			<div id="myGallery">
    				
    				
    				<?php
    				$featured_posts_category = get_theme_option('featured_posts_category');
    				
    				if($featured_posts_category != '' && $featured_posts_category != '0') {
    					global $post;
    
    					 $featured_posts = get_posts("numberposts=5&&category=$featured_posts_category");
    					 $i = 0;
    					 foreach($featured_posts as $post) {
    					 	setup_postdata($post);
                            if ( version_compare( $wp_version, '2.9', '>=' ) ) {
                                $slide_image_full = get_the_post_thumbnail($post->ID,'large', array('class' => 'full'));
                                $slide_image_thumbnail = get_the_post_thumbnail($post->ID,'large', array('class' => 'thumbnail'));
                            } else {
                                $get_slide_image = get_post_meta($post->ID, 'featured', true);
                                $slide_image_full = "<img src=\"$get_slide_image\" class=\"full\" alt=\"\" />";
                                $slide_image_thumbnail = "<img src=\"$get_slide_image\" class=\"thumbnail\" alt=\"\" />";
                            }
    					 	
    					  ?>
    					  <div class="imageElement">
    							<h3><?php the_title(); ?></h3>
    							<?php the_excerpt(); ?>
    							<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="open"></a> 
    							<?php echo  $slide_image_full; ?>
    							<?php echo  $slide_image_thumbnail; ?>
    						</div>
    					 <?php }
    				} else {
    					for($i = 1; $i <=5; $i++) {
    						?>
    							<div class="imageElement">
    								<h3>This is featured post <?php echo $i; ?> title</h3>
    								<p>To set your featured posts, please go to your theme options page in wp-admin. You can also disable featured posts slideshow if you don't wish to display them.</p>
    								<a href="#" title="This is featured post <?php echo $i; ?>" class="open"></a> 
    								<img src="<?php bloginfo('template_directory'); ?>/jdgallery/slides/<?php echo $i; ?>.jpg" class="full" alt="" /> 
    								<img src="<?php bloginfo('template_directory'); ?>/jdgallery/slides/<?php echo $i; ?>.jpg" class="thumbnail" alt="" /> 
    							</div>
    						<?php
    					}
    				}
    				
    				?>
    			</div>
    		</div>
    	</div>
    </div>
    <?php } ?>
    Code (markup):
    Thanks,
    FaNtEcH
     
    FaNtEcH, Jan 29, 2011 IP
  2. marharri

    marharri Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check in the <Head></Head> for the rest of the javascript or an include. That's not all of it.
     
    marharri, Jan 29, 2011 IP
  3. teamnirvana

    teamnirvana Active Member

    Messages:
    844
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Your site is not working.

    So cant have a look at it in the first place.
     
    teamnirvana, Jan 29, 2011 IP
  4. FaNtEcH

    FaNtEcH Well-Known Member

    Messages:
    284
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #4
    This code is the whole file that implements the slideshow thing.
     
    FaNtEcH, Jan 29, 2011 IP
  5. FaNtEcH

    FaNtEcH Well-Known Member

    Messages:
    284
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #5
    Oops, fixed now.
     
    FaNtEcH, Jan 29, 2011 IP