Modify Classifier Theme By ColorLabs

Yesterday i got several e-mails asking about how to create an ads using Classifier theme by ColorLabs. Then, i try to use this theme by my self to find out what they are asking.

Classifier.   Premium Classified Ads WordPress Theme

Maybe what i got here is the same as you got, when add a new ad with an images, you cannot find out where the images were stored.

After do an investigation for a while, the images are stored at the media and attached into the post (you have to add the images manually into the post so it can be viewed). For me, this is a problem because i don’t want to spent my time for this.

Today, i will tell you some modification so the images will be automatically displayed, so you don’t have to edit the the ad by your self.

This modification only require to edit one file, it is single-ad.php. Ok, first you have to open this file and you can find out this code:

<div class="entry-images">
          <div class="entry-slides">
			  $custom_field = 'colabs_discount';
			  $listing_discount = get_post_meta($post->ID,$custom_field,true);
			  if( !empty($listing_discount) ){ ?><div class="sale-price"> <?php echo $listing_discount; ?>% <strong><?php _e('Sale','colabsthemes'); ?></strong></div><?php } ?>
            <?php colabs_image('width=724&height=478&size=single-ad&link=img'); ?>
            <!--div id="gallery">
            	$ gallery = d _shortcode('[ga llery size="thumbnail" columns="4"]');
            	if (! $gallery) {
            		includ e('includes/ gallery.php'); // Photo gallery
            	} else {
            		// echo 'no-gallery'; 

Edit that code become:

<div class="entry-images">
          <div class="entry-slides">
			  $custom_field = 'colabs_discount';
			  $listing_discount = get_post_meta($post->ID,$custom_field,true);
			  if( !empty($listing_discount) ){ ?><div class="sale-price"> <?php echo $listing_discount; ?>% <strong><?php _e('Sale','colabsthemes'); ?></strong></div><?php } ?>
            <?php //colabs_image('width=724&height=478&size=single-ad&link=img'); ?>

			$attachments = get_children(array('post_parent' => $post->ID,
			'post_status' => 'inherit',
			'post_type' => 'attachment',
			'post_mime_type' => 'image',
			'order' => 'ASC',
			'orderby' => 'menu_order ID'));

			foreach($attachment as $att_id => $attachment) {
				$full_img_url = wp_get_attachment_url($attachment->ID);
				$split_pos = strpos($full_img_url, 'wp-content');
				$split_len = (strlen($full_img_url) - $split_pos);
				$abs_img_url = substr($full_img_url, $split_pos, $split_len);
				$full_info = @getimagesize(ABSPATH.$abs_img_url);

			<div class="all-images">
				<a href="<?php echo $full_img_url; ?>" title="<?php echo $attachment->post_title; ?>" target="blank"><img src="<?php bloginfo('stylesheet_directory'); ?>/functions/timthumb.php?src=<?php echo $full_img_url; ?>&w=220&h=220&a=t" style="margin-left:10px;" /></a>

			<?php } ?>


And done! After you do this modification, when the ad is published, the images attached into it will automatically displayed


11 thoughts on “Modify Classifier Theme By ColorLabs

  1. What’s up, just wanted to say, I liked this article. It was funny. Keep on posting!

  2. Thanks for another great article. The place else may anyone get that type of info in such a perfect means of writing? I have a presentation next week, and I am at the search for such information

    • Hi Warren,

      On the newest version of Classifier, you already have a gallery for your images in the single ads page.

      You can check your code start from:

      So, you don’t have to do the modification

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s