Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8327

    Dear all,

    I have a newscast theme and would like to change the pictures on the sliders to static pictures, then embed links + alt text to it. Could someone advise me on how to do this? Thank you so much.

    Regards,

    Alvin

    #61042

    Hey,

    you can replace following code in index.php:

    <?php
    // FRONTPAGE SLIDESHOW
    //
    // check if slideshow should be displayed?
    if($k_option['mainpage']['slider'] != 'none') :
    ?>
    <!-- FEATURED POST AREA ################################################### -->
    <div id="feature_wrap">
    <!-- ###################################################################### -->
    <div id="featured" class='<?php echo $k_option['mainpage']['slider']; ?>'>

    <?php

    //check slider and apply size to previe images
    $kimg = array('shortcut' => 'L', 'overwrite' => 'none');

    if($k_option['mainpage']['slider'] == 'fadeslider')
    {
    $kimg = array('shortcut' => 'XL', 'overwrite' => 'none');
    }

    // start the loop that gernerates the images
    $loopcount = 1;
    $additional_loop = new WP_Query("cat=".$k_option['mainpage']['feature_cats_final']."&posts_per_page=".$k_option['mainpage']['feature_count']);
    if ($additional_loop->have_posts()) :
    while ($additional_loop->have_posts()) : $additional_loop->the_post();

    $preview_image = kriesi_post_thumb($post->ID, array('size'=> array($kimg['shortcut'],$kimg['overwrite']),
    'display_link' => array('none'),
    'wh' => $k_option['custom']['imgSize'][$kimg['shortcut']]
    ));

    // Featured Entry:
    ?>
    <div class="featured featured<?php echo $loopcount; ?>">
    <a href="<?php the_permalink(); ?>">
    <span class='feature_excerpt'>
    <strong class='sliderheading'><?php the_title(); ?></strong>
    <span class='sliderdate'><?php the_time('M d, Y') ?></span>
    <span class='slidercontent'>
    <?php
    $content = strip_tags(get_the_excerpt(),'<a><strong><span>');
    echo $content;
    ?>
    </span>
    </span>
    <?php echo $preview_image; ?>
    </a>
    </div>
    <?php
    // end entry

    $loopcount ++;
    endwhile; endif;
    ?>

    </div><!-- end #featured -->

    <span class='bottom_right_rounded_corner ie6fix'></span>
    <span class='bottom_left_rounded_corner ie6fix'></span>

    <!-- ###################################################################### -->
    </div><!-- end featuredwrap -->
    <!-- ###################################################################### -->
    <?php endif; // end slideshow ?>

    with:

    <!-- FEATURED POST AREA ################################################### -->
    <div id="feature_wrap">

    <!-- ###################################################################### -->
    <div id="featured" class=''>

    <div class="featured featured1">
    <a href="http://www.kriesi.at/themes/newscast/2010/03/06/why-doesnt-apple-rebrand-to-banana/">
    <span class='feature_excerpt'>
    <strong class='sliderheading'>Apple rebrands to Banana!</strong>
    <span class='sliderdate'>Mar 06, 2010</span>
    <span class='slidercontent'>

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </span>
    </span>
    <img src='http://www.kriesi.at/themes/newscast/files/2010/03/content_pic1.jpg' alt='' title='Apple rebrands to Banana!' height='320 ' width='700' /> </a>
    </div>
    <div class="featured featured2">
    <a href="http://www.kriesi.at/themes/newscast/2010/03/06/hello-world-2/">
    <span class='feature_excerpt'>
    <strong class='sliderheading'>Hello world!</strong>

    <span class='sliderdate'>Mar 06, 2010</span>
    <span class='slidercontent'>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex </span>
    </span>
    <img src='http://www.kriesi.at/themes/newscast/files/2010/03/content_pic2.jpg' alt='' title='Hello world!' height='320 ' width='700' /> </a>
    </div>
    <div class="featured featured3">

    <a href="http://www.kriesi.at/themes/newscast/2010/01/05/how-to-draw-realistic-balloons-in-illustrator/">
    <span class='feature_excerpt'>
    <strong class='sliderheading'>How to draw realistic balloons in illustrator</strong>
    <span class='sliderdate'>Jan 05, 2010</span>
    <span class='slidercontent'>
    Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. </span>
    </span>

    <img src='http://www.kriesi.at/themes/newscast/files/2010/03/content_pic5.jpg' alt='' title='How to draw realistic balloons in illustrator' height='320 ' width='700' /> </a>
    </div>
    <div class="featured featured4">
    <a href="http://www.kriesi.at/themes/newscast/2010/01/05/how-to-create-a-beautiful-sunset-in-photoshop/">
    <span class='feature_excerpt'>
    <strong class='sliderheading'>How to create a beautiful sunset in Photoshop</strong>
    <span class='sliderdate'>Jan 05, 2010</span>

    <span class='slidercontent'>
    Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu </span>
    </span>
    <img src='http://www.kriesi.at/themes/newscast/files/2010/03/content_pic4.jpg' alt='' title='How to create a beautiful sunset in Photoshop' height='320 ' width='700' /> </a>
    </div>
    <div class="featured featured5">
    <a href="http://www.kriesi.at/themes/newscast/2010/01/05/tutorial-picture-of-the-week/">
    <span class='feature_excerpt'>

    <strong class='sliderheading'>Tutorial: Picture of the week</strong>
    <span class='sliderdate'>Jan 05, 2010</span>
    <span class='slidercontent'>
    Phasellus consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. </span>
    </span>
    <img src='http://www.kriesi.at/themes/newscast/files/2010/03/content_pic3.jpg' alt='' title='Tutorial: Picture of the week' height='320 ' width='700' /> </a>
    </div>

    </div><!-- end #featured -->

    <span class='bottom_right_rounded_corner ie6fix'></span>
    <span class='bottom_left_rounded_corner ie6fix'></span>

    <!-- ###################################################################### -->
    </div><!-- end featuredwrap -->
    <!-- ###################################################################### -->

    You need to change the slides content, etc. :)

    #61043

    Wow, this works wonders! Thank you dude! :)

    #61044

    Glad that I could help you :)

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

The topic ‘jQuery slider image change w/ alt text’ is closed to new replies.