WordPress.org

Ready to get started?Download WordPress

Forums

Need help with slider...PLEASE!!! (2 posts)

  1. johnjenco
    Member
    Posted 1 year ago #

    I am using a theme called Agroplus that was purchased from thememonster.com. I am having a problem with the slider. It is not working. There is a section to add images for the slider. When you click add new, it looks like you are adding a post. Since there is no instructions for the theme, I would assume I have to add the image that I would like to show up in the slider there. Is anyone familiar with this theme? There is a slider.php file. I will paste the code below, maybe one of you developers will see something helpful in the code.

    <div id="slider" class="nivoSlider">
      <?php $posts_counter = 0; ?>
      <?php
    		query_posts("post_type=slider&posts_per_page=-1&post_status=publish");
    		while ( have_posts() ) : the_post(); $posts_counter++;
    	?>
      <?php
    		$custom = get_post_custom($post->ID);
    		$url = get_post_custom_values("slider-url");
    		$sl_thumb = $custom["thumb"][0];
    		$sl_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'slider-post-thumbnail');
    		$tab_title = get_post_custom_values("tab-title");
    	?>
      <?php if(has_post_thumbnail( $the_ID) || $sl_thumb!=""){ ?>
    
    		<?php if($url!=""){ ?>
        <?php if($sl_thumb!=""){
    					echo "<img src='" . $sl_thumb . "' alt='";
    					echo $tab_title[0];
    					echo "' title='#sliderCaption" . $posts_counter . "' />";
    								} else{
    					echo "<img src='";
    					echo $sl_image_url[0];
    										echo "' alt='";
    					echo $tab_title[0];
    					echo "' title='#sliderCaption" . $posts_counter . "' />";
    								} ?>
        <?php }else{ ?>
        <?php if($sl_thumb!=""){
    					echo "<img src='" . $sl_thumb . "' alt='";
    					echo $tab_title[0];
    					echo "' title='#sliderCaption" . $posts_counter . "' />";
    								} else{
    					echo "<img src='";
    					echo $sl_image_url[0];
    										echo "' alt='";
    					echo $tab_title[0];
    					echo "' title='#sliderCaption" . $posts_counter . "' />";
    								} ?>
        <?php } ?>
    
      <?php } ?>
      <?php endwhile; ?>
      <?php wp_reset_query();?>
    </div>
    <?php $posts_counter = 0; ?>
    <?php
    	query_posts("post_type=slider&posts_per_page=-1&post_status=publish");
    	while ( have_posts() ) : the_post(); $posts_counter++;
    ?>
    <?php
    	$custom = get_post_custom($post->ID);
    ?>
    <div id="sliderCaption<?php echo $posts_counter ?>" class="nivo-html-caption">
      <?php the_content(); ?>
    </div>
    <?php endwhile; ?>
    <?php wp_reset_query();?>
  2. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 1 year ago #

    You need to get support for your commercial theme from the vendor.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags