Results 1 to 5 of 5

Thread: Featured slider & images

  1. #1
    Thread Starter
    Member davideus's Avatar
    Join Date
    Sep 2013
    Location
    Georgia
    Posts
    63
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Featured slider & images

    Is there any way to make the featured slider exclude ads that have no image so the featured slider only shows ads that have images uploaded?
    I know it's mostly by classipress part but also related to design and look of headline childtheme. I did not get any help in classipress threads (

    I've researched a little and found this part of code:

    includes/theme-functions.php

    Code:
    /**
     * Returns ads which are marked as featured for slider
     */
    function cp_get_featured_slider_ads() {
    
    	$args = array(
    		'post_type' => APP_POST_TYPE,
    		'post_status' => 'publish',
    		'post__in' => get_option('sticky_posts'),
    		'posts_per_page' => 15,
    		'orderby' => 'rand',
    		'suppress_filters' => false,
    	);
    
    	$args = apply_filters( 'cp_featured_slider_args', $args );
    
    	$featured = new WP_Query( $args );
    
    	if ( ! $featured->have_posts() )
    		return false;
    
    	return $featured;
    }
    I've tried this in "if" statement, but with no luck ((
    Code:
    if ( ! $featured->have_posts() && ! wp_get_attachment_image($image_id, 'featured-thumbnail') )

  2. #2
    tinygiantstudios's Avatar
    Join Date
    Jan 2011
    Posts
    1,607
    Thanks
    31
    Thanked 157 Times in 148 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!


  3. #3
    Thread Starter
    Member davideus's Avatar
    Join Date
    Sep 2013
    Location
    Georgia
    Posts
    63
    Thanks
    5
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    Member davideus's Avatar
    Join Date
    Sep 2013
    Location
    Georgia
    Posts
    63
    Thanks
    5
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    tinygiantstudios's Avatar
    Join Date
    Jan 2011
    Posts
    1,607
    Thanks
    31
    Thanked 157 Times in 148 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Bigger Featured slider images
    By manishkhullar in forum ClassiPress General Discussion
    Replies: 0
    Last Post: September 5th, 2013, 09:47 PM
  2. Featured images in slider
    By orangemedia in forum Clipper General Discussion
    Replies: 13
    Last Post: June 30th, 2013, 05:29 PM
  3. Dimitris Featured images in slider
    By orangemedia in forum Report Clipper Bugs
    Replies: 3
    Last Post: February 26th, 2013, 04:22 AM
  4. Replies: 6
    Last Post: September 25th, 2012, 06:03 AM
  5. How do you remove Ads from the Featured Slider that don't use images
    By josh_red in forum ClassiPress General Discussion
    Replies: 1
    Last Post: September 18th, 2012, 12:52 AM