slider not working, picture not showing up, no function
-
hi everyone.
really hope someone can help. can’t seem to find the problem with the slider.it should look and function like this:
https://www.templatemonster.com/demo/32824.htmlbut it looks like this:
https://www.l-h-dienstleistungen.dethe main image doesnt show and clicking on the thumbnails doesn’t switch the large image.
the “slider.php” is:
<?php $posts_counter = 0; query_posts("post_type=slider&posts_per_page=-1&post_status=publish"); if(have_posts()) { ?> <div id="slider" class="nivoSlider"> <?php while ( have_posts() ) : the_post(); $posts_counter++; ?> <?php $custom = get_post_custom($post->ID); $url = get_post_custom_values("slider-url"); $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 echo "<a href='" . $url[0] . "'>"; echo "<img src='"; echo $sl_image_url[0]; echo "' alt='"; echo $tab_title[0]; echo "' title='#sliderCaption" . $posts_counter . "' />"; echo "</a>"; ?> <?php }else{ ?> <?php 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> <div class="nivo-controlNav"> <?php $posts_counter = 0; query_posts("post_type=slider&posts_per_page=-1&post_status=publish"); ?> <?php while ( have_posts() ) : the_post(); $posts_counter++; ?> <?php $custom = get_post_custom($post->ID); $url = get_post_custom_values("slider-url"); $sl_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'slider-small-thumbnail'); $tab_title = get_post_custom_values("tab-title"); ?> <?php if(has_post_thumbnail( $the_ID) || $sl_thumb!=""){ ?> <?php echo "<a class='nivo-control' rel='" . ($posts_counter-1) . "'>"; echo "<img src='"; echo $sl_image_url[0]; echo "' alt='"; echo $tab_title[0]; echo "' title='#sliderCaption" . ($posts_counter-1) . "' />"; echo "</a>"; ?> <?php } ?> <?php endwhile; ?> <?php wp_reset_query();?> </div> <?php } else { ?> <div class="attention-box alert-box" style="margin: 170px 20px 0 20px;">You don't have any <strong>Slides</strong>. You need to create them using <strong>Slides</strong> custom post type.</div> <?php } ?> <?php wp_reset_query();?> <?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; ?> <a href="<?php bloginfo('url'); ?>/?page_id=72" class="button slider-button">Mehr</a> <?php wp_reset_query();?>
can’t seem to find what’s causing the problem.
any assistance would be greatly appreciated. thx
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘slider not working, picture not showing up, no function’ is closed to new replies.