Re-create RoyaleRoom Themes By ColorLabs & Company

RoyaleRoom   Premium Real Estate WordPress Theme
RoyaleRoom one of many themes created by ColorLabs & Company

If you are a web lover, especially WordPress, a theme is the key to make your site more attractive and of course it will make your visitors enjoy reading your site

This time i inspired by a theme which made by ColorLabs & Company, RoyaleRoom. This theme by default is a business theme which will allow you to displaying a property listing. But, for me this theme is very attractive, and why not if we make this theme become a standard blogging site?

For your information, this theme has 2 custom post type, they are Property Listing and Agents. Those 2 post types is required in order to displaying the property listing. And after this modification, those post type is not needed any more.

To make it short, let’s start the modification to make this theme become a normal theme which only displaying a default post type.

  1. Delete Custom Post Type
    To make your consentration much better, we will need to remove the custom post type.  To do it, you can change the name of a file named ‘theme-custom-type.php‘ become another, for example theme-custom-type-old.php
  2. Edit The Slider
    Slider at this theme will only displaying a property post type, because of that we will edit the slider to only displaying a default post type. To do it, we will need to edit 2 files: theme-options.php and index.php. First, find out this code at file named theme-options.php (this file is located at directory /royaleroom/includes):

    //Metabox Settings
        $colabs_metabox_settings['post'] = array(
                                    'id' => 'colabsthemes-settings',
    								'title' => 'ColorLabs' . __( ' Image/Video Settings', 'colabsthemes' ),
    								'callback' => 'colabsthemes_metabox_create',
    								'page' => 'post',
    								'context' => 'normal',
    								'priority' => 'high',
                                    'callback_args' => ''
    								);
    

    Then, copy and paste this code below after the code above:

    //Metabox Settings
        $colabs_metabox_settings['post'] = array(
                                    'id' => 'colabsthemes-settings',
    								'title' => 'ColorLabs' . __( ' Image/Video Settings', 'colabsthemes' ),
    								'callback' => 'colabsthemes_metabox_create',
    								'page' => 'post',
    								'context' => 'normal',
    								'priority' => 'high',
                                    'callback_args' => ''
    								);
    

    After you did the step above, then you will have a new metabox at edit/add new post page, if this metabox value is true (ticked) then your post will be displayed at the slider

    Then, at file named Header.php find out this code:

    <?php
    		$wp_query = new WP_Query( array(
    			'post_type' => 'property',
    			'meta_key'	=> 'property_as_featured',
    			'meta_value'=> 'true'
    		));
    		if($wp_query->have_posts()): while($wp_query->have_posts()): $wp_query->the_post();
    		?>
    

    Edit that code become:

    <?php
    		$wp_query = new WP_Query( array(
    			'post_type' => 'post',
    			'meta_value'=> 'true'
    		));
    		if($wp_query->have_posts()): while($wp_query->have_posts()): $wp_query->the_post();
    		?>
    
  3. Editing Index (main body)
    Main Body or anything which is located at file named index.php will displaying just a property post type, then open that file and find out this code:

    <?php
    	$wp_query = new WP_Query( array(
    			'post_type' => 'property',
    			'meta_key'	=> 'property_as_featured',
    			'meta_value'=> 'false',
    			'paged'		=> $paged
    		));
    	if(have_posts()): while(have_posts()): the_post();
    		$id = get_the_ID();
    			$address = get_post_meta($id, 'property_address',true);
    			$citystate = get_post_meta($id, 'property_citystate',true);
    			$price = get_post_meta($id, 'property_price',true);
    			$beds = get_post_meta($id, 'property_beds',true);
    			$baths = get_post_meta($id, 'property_baths',true);
    			$size = get_post_meta($id, 'property_size',true);
    			$garage = get_post_meta($id, 'property_garage',true);
    			$furnished= get_post_meta($id, 'property_furnished',true);
    			$mortgage= get_post_meta($id, 'property_mortgage',true);
    			$show= get_post_meta($id, 'property_show',true);
                $colabs_unit_measure = get_option('colabs_unit_measure');
                $colabs_unit_bedrooms = get_option('colabs_unit_bedrooms');
    	?>
          <article>
            <div>
    		  <?php
    			  echo '<a href="'.colabs_image('link=url&return=true&key=property_image').'" title="'.get_the_title().'" rel="lightbox">'.colabs_image('width=348&height=231&link=img&return=true&key=property_image').'</a>';
    			  if (trim($price)!='') echo '<div>'.$price.'</div>';
    		  ?>
            </div>
            <div>
              <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
              <div><?php echo $address.' '.$citystate;?> <span><?php _e("on sale","colabsthemes"); ?></span></div>
              <div><?php _e("Date","colabsthemes"); ?> <time><?php the_time(get_option('date_format')); ?></time></div>
    		  <?php
    		  if(($size!='') && ($beds!='') && ($baths!='')):
               echo '<ul>';
                if($size!='') echo '<li>'.$size.' '. $colabs_unit_measure .'</li>';
                if($beds!='') echo '<li>'.$beds.' '.__( $colabs_unit_bedrooms,"colabsthemes").'</li>';
                if($baths!='') echo '<li>'.$baths.' '.__("baths","colabsthemes").'</li>';
               echo '</ul>';
    		  endif;
    		  ?>
    

    Edit that code become:

    <?php
    	$wp_query = new WP_Query( array(
    			'post_type' => 'post',
    			'paged'		=> $paged
    		));
    	if(have_posts()): while(have_posts()): the_post();
    	?>
          <article>
            <div>
    		  <?php
    			  echo '<a href="'.colabs_image('link=url&return=true&key=property_image').'" title="'.get_the_title().'" rel="lightbox">'.colabs_image('width=348&height=231&link=img&return=true&key=property_image').'</a>';
    		  ?>
            </div>
            <div>
              <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
              <div><?php _e("Date","colabsthemes"); ?> <time><?php the_time(get_option('date_format')); ?></time></div>
    

    You already done a quarter way of the modification, congratulations!

  4. Editing Footer (featured property post type)
    At footer section of this theme will be displayed a featured property post type, but this section will only be displayed at single (post/page). Because of that, we have to edit this section to only displaying a featured regular post, you can start it with editing a file named footer.php and find out this code:

     <?php
    		$wp_query = new WP_Query( array(
    			'post_type' => 'property',
    			'meta_key'	=> 'property_as_featured',
    			'meta_value'=> 'true'
    		));
    		while ( have_posts() ) : the_post();
    	  ?>
    

    Edit that code become:

    <?php
    		$wp_query = new WP_Query( array(
    			'post_type' => 'post',
    			'meta_value'=> 'true'
    		));
    		while ( have_posts() ) : the_post();
    	  ?>
    

Ok, until here you already done with the modification of RoyaleRoom theme. But what you have to remember is a label like latest property and featured property (located at footer.php – you will saw those label when editing the code). And for the section below the slider, i didn’t review it because of that section will only displaying a featured page.

Interested to this theme? Please check it at this url

Advertisements

6 thoughts on “Re-create RoyaleRoom Themes By ColorLabs & Company

  1. Hello would you mind sharing which blog platform you’re working with? I’m
    looking to start my own blog soon but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking
    for something unique. P.S Apologies for getting off-topic but I had
    to ask!

  2. Fantastic blog! Do you have any recommendations
    for aspiring writers? I’m hoping to start my own website soon but I’m a little lost on everything.

    Would you propose starting with a free platform like
    Wordpress or go for a paid option? There are so many options out there that I’m totally overwhelmed .. Any suggestions? Thanks!

  3. I simply want to say I am just very new to weblog and honestly loved you’re web-site. Very likely I’m going to bookmark your website . You surely come with great articles. Thanks a lot for sharing your website.

  4. I simply want to say I am just newbie to blogging and site-building and honestly savored this website. Very likely I’m going to bookmark your blog . You definitely come with awesome articles. Thank you for sharing your website page.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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