How to change parameters for the featured slider

Someone asked me if there is a limit on the number of the featured images in the slider.I found the file with the settings and there is a limit of 15 ads.The file is in classipress/includes/functions.php


$args = array(
 'post_type' => APP_POST_TYPE,
 'post_status' => 'publish',
 'post__in' => get_option( 'sticky_posts' ),
 'posts_per_page' => 15,
 'orderby' => 'rand',
 'no_found_rows' => true,
 'suppress_filters' => false,
 );

these are the settings/arguments and you can change them, always using a child theme.For example you can change them to


$args = array(
		$args = array(
		'post_type' => APP_POST_TYPE,
		'post_status' => 'publish',
		'post__in' => get_option( 'sticky_posts' ),
		'posts_per_page' => 11,
		'orderby' => 'title',
		'order' =>'ASC',
		'no_found_rows' => true,
		'suppress_filters' => false,
	);

How to do it with a child theme:

copy the file featured.php in your child theme
change this line

<?php if ( $featured = cp_get_featured_slider_ads() ) : ?>

to

<?php if ( $featured = db_cp_get_featured_slider_ads() ) : ?>

then copy the function cp_get_featured_slider_ads(); in your functions.php and rename it to db_cp_get_featured_slider_ads();

last make the changes in your own / new function

You can download a demo here
cp-child-query