Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to add an 2nd Featured Slider on your website

  1. #1
    Thread Starter
    Member Bredvig's Avatar
    Join Date
    Jul 2010
    Location
    Dublin, Ireland
    Posts
    70
    Thanks
    2
    Thanked 10 Times in 7 Posts

    How to add an 2nd Featured Slider on your website

    Hi all,

    I would like to share below tutorial with all.

    First I would like to thank foundationmedia for getting me all the way. http://forums.appthemes.com/featured...el-size-10651/

    If you would like to have a 2nd slider on your website that are different in size from the main on, the follow on.

    I'm not to good at explaining things so bear with me.

    Files you need to do the changes in are:

    Code:
    Index.php
    Featured.php
    Custom Style Sheet
    +
    The new featured-2.php you create in this tutorial

    In my index.php I copied the

    Code:
                <?php 
    			if ( file_exists(STYLESHEETPATH . '/featured.php') )
    	                include_once(STYLESHEETPATH . '/featured.php');
        	        else
            	        include_once(TEMPLATEPATH . '/featured.php');
    			?>
    			
    			<?php include_once(TEMPLATEPATH . '/includes/theme-searchbar.php'); ?>

    And change the second one to



    Code:
    <?php 
    			if ( file_exists(STYLESHEETPATH . '/featured-2.php') )
    	                include_once(STYLESHEETPATH . '/featured-2.php');
        	        else
            	        include_once(TEMPLATEPATH . '/featured-2.php');
    			?>
    			
    			<?php include_once(TEMPLATEPATH . '/includes/theme-searchbar.php'); ?>
    Then I took a copy of the featured.php. I called it featured-2.php

    In the copied file (featured-2.php) I added a '2' to.

    Code:
    • $('.slider2').jCarouselLite({
    • <div class="shadowblock_out2">
    • div class="shadowblockdir2">
    • <div class="sliderblockdir2">
    • <div id="list2">
    • <div class="slider2">
    Please see how my featured-2.php look like below

    Code:
    <?php
    /**
     * The featured slider on the home page
     *
     */
    ?>
    
    <?php if ( get_option('cp_enable_featured') == 'yes' ) : ?>
    
    <script type="text/javascript">
    // <![CDATA[
        /* featured listings slider */
        jQuery(document).ready(function($) {
            $('.slider2').jCarouselLite({
                btnNext: '.next',
                btnPrev: '.prev',
                visible: 3,
                hoverPause: true,
                auto: 2800,
                speed: 3000,
                easing: 'easeOutQuint' // for different types of easing, see easing.js
            });
        });
    // ]]>
    </script>
    
        <?php query_posts( array('post__in' => get_option('sticky_posts'), 'post_type' => APP_POST_TYPE, 'post_status' => 'publish', 'orderby' => 'rand') ); ?>
    
            <?php if ( have_posts() ) : ?>
    
            <!-- featured listings -->
            <div class="shadowblock_out2">
    
                <div class="shadowblockdir2">
    
                    <h2><class="dotted"><?php _e('Test Premium Ads', 'appthemes')?></h2>
    
                    <div class="sliderblockdir2">
    
                        <div id="list2">
    
                            <div class="prev"><img src="<?php bloginfo('template_url'); ?>/images/prev.png" alt="" /></div>
    
                            <div class="slider2">
    
    
                                                        <ul>
    
    
                                    <?php while ( have_posts() ) : the_post(); ?>
    
                                        <li>
                                            <span class="feat_left">
    
               <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"  <?php if ((get_option('cp_ad_image_preview') == 'yes') && (cp_get_image_url_raw($post->ID, 'large', 1) == true)) { ?>class="preview" rel="<?php echo cp_get_image_url_raw($post->ID, 'large', 1); ?>" <?php } ?>><?php if(get_post_meta($post->ID, 'images', true)) cp_single_image_legacy($post->ID, get_option('thumbnail_size_w'), get_option('thumbnail_size_h'), 'preview'); else cp_get_image_url_feat($post->ID,'thumbnail', 'preview', 1); ?></a>
    											
    											<div class="clr"></div>
    
                                                <span class="price_sm"><?php if ( get_post_meta($post->ID, 'price', true) ) cp_get_price_legacy($post->ID); else cp_get_price($post->ID, 'cp_price'); ?></span>
    
    										</span>
    
                                                                                       
                                        </li>
    
                                    <?php endwhile; ?>
    
                                </ul>
    
                            </div>
    
                            <div class="next"><img src="<?php bloginfo('template_url'); ?>/images/next.png" alt="" /></div>
    
                        </div><!-- /slider -->
    
                        <div class="clr"></div>
    
                    </div><!-- /sliderblock -->
    
                </div><!-- /shadowblock -->
    
            </div><!-- /shadowblock_out -->
    
            <?php endif; ?>
    
            <?php wp_reset_query(); ?>
    
    <?php endif; // end feature ad slider check ?>

    In my style sheet I added below

    You can copy those from the style.css and just a '2' after it, or just copy below. Remember the '2' has to match the number/name given in the 'featured-2.php' above


    Code:
    .content_res .shadowblockdir2 {
        background-color: #F2F2F2;
        border: 1px solid #C6C6C6;
        border-radius: 0 0 0 0;
        width: 560px;
    }
    
    .content_res .shadowblockdir2 {
        height: 200px;
        padding: 8px 15px 5px;
    }
    
    .shadowblock_out2 {
        border: 0 solid #000000;
        border-radius: 0px 0px 0px 0px;
        margin: 0 0 20px;
        width: 560px;
    }
    
    #list2 {
        height: 150px;
        margin: 0 auto;
        width: 555px;
    }
    
    .slider2 ul li { padding:2px 29px; height:150px; width:90px}
    
    .slider2 { float:left; left:-5000px; margin-left:50px; position:relative; height: 150px; /* visibility:hidden; */}
    The end result can be seen here

    dubclassified.com

    Thats it, happy fixing

    Bredvig
    Attached Images Attached Images
    Last edited by Bredvig; September 9th, 2011 at 06:47 AM. Reason: typo

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,704
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Member Bredvig's Avatar
    Join Date
    Jul 2010
    Location
    Dublin, Ireland
    Posts
    70
    Thanks
    2
    Thanked 10 Times in 7 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. The Following User Says Thank You to Bredvig For This Useful Post:

    nightwinter (September 13th, 2011)

  5. #4
    Thread Starter
    Member Bredvig's Avatar
    Join Date
    Jul 2010
    Location
    Dublin, Ireland
    Posts
    70
    Thanks
    2
    Thanked 10 Times in 7 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #5
    Rookie nightwinter's Avatar
    Join Date
    Aug 2011
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #6
    Thread Starter
    Member Bredvig's Avatar
    Join Date
    Jul 2010
    Location
    Dublin, Ireland
    Posts
    70
    Thanks
    2
    Thanked 10 Times in 7 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. The Following User Says Thank You to Bredvig For This Useful Post:

    nightwinter (September 13th, 2011)

  9. #7
    Rookie nightwinter's Avatar
    Join Date
    Aug 2011
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. #8
    rubencio's Avatar
    Join Date
    May 2010
    Location
    Spain
    Posts
    3,804
    Thanks
    268
    Thanked 316 Times in 278 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

    r u b e n c i o . c o m


    Since 2010 providing AppThemes solutions,
    Plugins and the best childthemes...



  11. #9
    Veteran mouradbouikni's Avatar
    Join Date
    Feb 2011
    Location
    France
    Posts
    366
    Thanks
    26
    Thanked 20 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  12. #10
    Newbie compressortr's Avatar
    Join Date
    Feb 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Featured Listing Slider Ads Not Showing in Slider
    By kplunk in forum Report ClassiPress Bugs
    Replies: 11
    Last Post: June 12th, 2016, 10:14 PM
  2. Featured ad slider
    By sgg123 in forum Report ClassiPress Bugs
    Replies: 8
    Last Post: September 21st, 2012, 06:42 PM
  3. No Featured Ads Appearing in Featured Ad Slider
    By royalstar in forum Report ClassiPress Bugs
    Replies: 6
    Last Post: August 4th, 2012, 11:00 AM
  4. Replies: 4
    Last Post: December 30th, 2010, 04:50 PM
  5. Replies: 12
    Last Post: September 7th, 2010, 05:09 PM