Classifier: Random Slider


This time i want to answer a question from my friend Joseph from Michigan. He asked about a theme named Classifier, this theme is a classified ads WordPress theme you can use to displaying an ads from you and also your customers.

By default, you can set this theme to be monetized or not. At this case, Joseph doesn’t want to make it monetize. So, all ads submission should be free and there is no price even for the featured ads.

At this tutorial, i want to tell you about how to displaying a random ads at your slider. This modification is super simple, you need to modify a file named featured-main.php. This file can be found via FTP at directory: wp-content → themes → classifier → includes.

Open the file and find out this code:

$slides = get_posts(
        'post_type' => COLABS_POST_TYPE ,
        'numberposts' => $featposts,
        'tax_query' => array(
            array(  'taxonomy' => COLABS_TAX_TAG,
                    'field' => 'id',
                    'terms' => $tag_array

Modify it become:

$slides = get_posts(
        'post_type' => COLABS_POST_TYPE ,
        'numberposts' => $featposts,
        'orderby' => 'rand',

And done!


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s