Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1334

    Hi

    I want to use one static image 960×320 on the frontpage, no slider etc. How do I fix that?

    Great theme. Thanks in advance.

    Best Regards, M.

    #34908

    Hey,

    To change the slider for a static image (ie remove the slider completely), open up index.php and find this code:

    <?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 ?>

    Replace it with:

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

    <div class="featured">
    <a href="http://example.com/">
    <img src="/path/to/image.jpg" width="960" height="320" />
    </a>
    </div>

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

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

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

    Let me know how you get on :)

    James

    #34909

    Many thanks! Could you also please tell me how to use the Crossfade slider with just images – without text and transparent white background?

    Best Regards, Mil.

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

The topic ‘One Image – No slider’ is closed to new replies.