• I am using ‘smoothgallery’ and the plugin ‘get image’ to attempt to create a page which pulls all images from one category of a photography website and makes them into a slideshow. Here’s the code:

    <?php
    /*
    Template Name: Gallery
    */
    ?>
    
    <?php get_header(); ?>
    
    <!--Css SmoothGallery-->
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/smoothgallery/css/jd.gallery.css" type="text/css" media="screen"/>
    <!--JS Mootools-->
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/smoothgallery/scripts/mootools.v1.11.js"></script>
    <!--JS SmoothGallery-->
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/smoothgallery/scripts/jd.gallery.js"></script>
    
    <style type="text/css">
    #myGallery, #myGallerySet, #flickrGallery
    {
    width: 740px;
    height: 495px;
    border: 1px solid #000;
    }
    </style>
    
    <div id="wrapper">
    
    	<div id="single" class="page">
    
    		<h2><?php the_title(); ?></h2>
    
    		<div class="post">
                    	<div id="myGallery">
    <!-- Initialization of SmoothGallery-->
    <script type="text/javascript">
    	function startGallery() {
    	var myGallery = new gallery($('myGallery'),
    	{timed: true});}
    	window.addEvent('domready',startGallery);
    </script>
    		<?php
    		$page_name=the_title();
    		switch ($page_name) {
        			case "Love":
            			$cat_id=4;
           			 	break;
        			case "Laugh":
            			$cat_id=5;
            			break;
        			case "Live":
            			$cat_id=6;
            			break;
    		} ?>
    		<?php query_posts('showposts=10&cat=$cat_id');?>
    		<?php while (have_posts()) : the_post(); ?>
    		<!--get the custom fields gallery_image
    			(fields which contains the link to the image to show in the gallery)
    		-->
    		<?php $values = gi_library('all', 'class="full" alt="Item Title"', 'false', 'array'); ?>
    		<?php $values2 = gi_library('all', 'class="thumbnail" alt="thumbnail of Item Title"', 'false', 'array'); ?>
    		<!-- Verify if you set the custom field gallery_image for the post -->
    		<?php if(isset($values[0]))
    		{?>
    			<!--define a gallery element-->
    			<div class="imageElement">
    				<!--post's title to show for this element-->
    				<h3><?php the_title(); ?></h3>
    				<!--post's excerpt to show for this element-->
    				<?php the_excerpt(); ?>
    				<!--Link to the full post-->
    				<a href="<?php the_permalink() ?>" title="Read more" class="open"></a>
    				<!-- Define the image for the gallery -->
    				<?php echo $values[0]; ?>
    				<!-- Define the thumbnail for the gallery -->
    				<?php echo $values2[0]; ?>
    			</div>
    		<?php }?>
    		<?php endwhile; ?>
    	</div>
    
    	</div>
    
    		<div class="main_meta">
    			<ul>
    				<?php if (is_page('Contact')) { ?>
    					<li><strong>Contact:</strong> Please send me a message. </li>
    				<?php } elseif (is_page()) { ?>
    
    					<li><?php the_time('F jS, Y'); ?></li>
    					<li>Posted in <?php the_category(', ') ?></li>
    
    				<?php } ?>
    			</ul>
    
    			<p class="edit"><?php edit_post_link('Edit', '', ''); ?></p>
    		</div>
    
    	<div class="clear"></div>
    	</div>
    
    </div> <!-- end wrapper -->
    <?php get_footer(); ?>

    I am at my wit’s end here, do not understand why it’s not working. Help?

    Steven

    PS: Used this http://www.catswhocode.com/blog/how-to-integrate-a-slideshow-in-your-wordpress-theme as a guide.

    PSS: 3 Categories are live, love, laugh, that works correctly. What I’m stuck on is why the slideshow isn’t displaying when it seems that everything is outputting correctly.

    UPDATE: Tried the ‘get the image’ plugin as well. Still no avail.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    you can integrate slideshow in your blog post/page via this simple steps:

    1) One needs to create an account at http://slide.com
    2) Create a slideshow at slide.com
    3) They will provide a code which one has to enter in post or page of wordpress blog.
    4) save the page/post and publish it.

    Thanks,

    Shane G.

    Thread Starter stevenheidel

    (@stevenheidel)

    Sorry, not what I asked for.

    I’m looking to turn all the images from posts in a certain category into a slideshow.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Integrate slideshow into page’ is closed to new replies.