Plugin Files

Check File Integrity

Installing Plugin

This plugin should be installed as a normal WordPress would using WordPress Plugin Uploader.

WordPress Uploader

Property Type

Property Types is the main entity for bundling together different property fields and property attributes. Different property types can have different set of property fields and property attributes attached to it

Check File Integrity

Edit Form - Settings

Field Value Description
Name string The Machine name for this property type, The actual Taxonomy name is not related to this name field as the taxonomy term will be created with generated unique id.
Display Label string The display label for this property type, the actual label rendered at the front end will depends on how the theme rendering the property, the default method will take the value from this field.
Display Icon icon The icon that will be displayed on front end when rendering the property type, theme can also choose to disable the icon rendering.

Edit Form - Attributes

Field Value Description
attributes string Choose single or multiple attributes (hold ctrl + click) to attach multiple property attributes into this property type

Edit Form - Fields

Field Value Description
checkbox check/uncheck Disable or enable the property field for this property type, the settings can be changed for each property type differently.
settings check/uncheck enable or disable each fields settings per property type. each field may have different settings such as for determining element visibility.

Edit Form - Maps

Field Value Description
uploader file Upload a custom image to act as the property type maps marker, this setting can be changed for each property type

Property Fields

Property Fields is a static type of property entity, unlike the property attributes where you can create one via GUI, Property Field can only be created and registered programmatically via coding.

Manage Form

Property Attributes

Property Attributes is a type of property entity that can be registered and created via GUI, the purpose of a property attributes is to extend property type with a new customizable field created by user. You can also share a single Property Attribute with multiple Property Types. All the property attributes data is stored as a WordPress taxonomy term.

Manage Form

Edit Form - Settings Panel

Edit Form - Display Panel

Edit Form - Metabox Panel

Property Configuration

The configuration form is the global configuration for the property plugin, some theme will override this configuration form fields or data entry to match the theme settings.

Gallery

Media

Teaser

Maps

Contact Form 7

Property Loop Listing

Property Loop widget is the widget to display property listing in widget format, the widget provides a configuration form that can configure the way the property listing should displayed.

Configuration Form

Property Maps

Property Advanced Maps widget a widget to display property item in a maps as a map marker with search and filtering capability. This widget only available if VicTheme Maps plugin is installed and activated.

Configuration Form

Metro Style Loop

Property Metro Listing widget is a widget for displaying property listing in metro stacked listing style

Configuration Form

Property Recent List

Property latest is a simple widget for displaying the property listing with filter to sort the queried property post order per its creation date.

Configuration Form

Property Search

Property Advanced Search widget will provide a widget with property search form, the search form can target different kind of property loop element such as property loop widget, property loop shortcodes, property loop visual composer shortcodes and property loop created directly using PHP code in a template.

Configuration Form

Property Attributes

Shortcode - vpropertyattributes

 [vpropertyattributes

   // Post ID (required)
   postid="numeric"

   // disable single attribute
   property_xxxxxx="true"
 ]
          
Atts Value Description
postid numeric Define the property post id to retrieve the data from.
property_xxxxx valid property attributes taxonomy term machine name when defined the property_xxxx value will be hidden from display

Property Fields

Shortcode - vpropertyfields

 [vpropertyfields

   // Post ID (required)
   postid="numeric"

   // disable single fields
   property_xxxxxx="true"
 ]
          
Atts Value Description
postid numeric Define the property post id to retrieve the data from.
property_xxxxx valid property fields taxonomy term machine name when defined the property_xxxx value will be hidden from display

Property Style Loop

Shortcode - vpropertyloop

[vpropertyloop
  title = "string for the block title"
  description = "string for the block description"
  id = "uniqueid"
  ajax = "boolean"
  type = "boolean"
  pager = "boolean"
  drill = "boolean"
  mini = "boolean"
  infinite = "boolean"
  prev_text = "some text"
  next_text = "some text"
  posts_per_page = "number of post per page"
  loading-text = "ajax loading text"
  all = "the all button text"
  template = "grid|list"

  // Bootstrap column for the teaser item
  teaser_columns_mobile="X"
  teaser_columns_tablet="X"
  teaser_columns_small="X"
  teaser_columns_large="X"
]
          
Atts Value Description
title string The main title for the loop block
description string The description under the title for the loop block
id unique string The ID to mark the loop object, This is needed for correct pagination, search and filtering. Two instance of loop object with the same ID in the same page will perform pagination, search and filtering together when one is invoked. When coupling this loop object with property search, this ID needs to be registered as the target for the property search submission result.
ajax boolean use ajax for pagination, search and filtering
type boolean disable or enable the property type list filter element
pager boolean enable or disable the pager element
drill boolean when enabled, the property type list will only show the first level of taxonomy initially and then drill down to another level when parent is selected
mini boolean use mini pagination with shown previous and next element only
infinite boolean use infinite pager
template grid | list | custom template if supported by theme select the property item display template
teaser_columns_* numeric the grid column for different view size as Bootstrap Column rules

Property Maps

Shortcode - vpropertymap

[vpropertymap
  title="some title"
  description ="some description"
  posts_per_page = "number of marker per page"
  search = "true|false" build the search box
  search_position = "top|left|right|bottom"
  search_alignment = " vertical|horizontal"
  search_title = "some text for the search box title"
  search_description = "some text for the search box description"
  types__xx = the property type allowed in the search box
  data__xx = a single data- attributes for the maps element
  fields__{field machine name} = hidden // disable a single field
  attributes__{attributes machine id} = hidden // disable a single attributes
]
          
Atts Value Description
title string The main title for the loop block
description string The description under the title for the loop block
posts_per_page number The maximum marker shown in the single instance, this will also limit the marker fetched when search used
search true or false show or hide the search form element
search_position top or left or right or bottom The position of the search form element relative to the map box
search_alignment vertical or horizontal The search box alignment
types__xx valid property types taxonomy replace xx with valid property type taxonomy machine name, if entered the property type will be hidden from the search form as by default all types is enabled
data__xx string replace xx with any data type that will be printed as html5 data-* attributes for the maps element, this is useful to override any data-* for maps settings
fields__xx valid property field taxonomy replace xx with valid field taxonomy machine name, when enabled the property field will be hidden from the search form
attributes__xx valid property attributes taxonomy replace xx with valid attributes taxonomy machine name, when enabled the property attributes will be hidden from the search form

Property Metro Style Loop

Shortcode - vpropertymetro

[vpropertymetro
  title = "string for the block title"
  description = "string for the block description"
  type = "boolean"
  auto_fill = "boolean"
  posts_per_page = "number of post per page"
  all = "the all button text"
]
          
Atts Value Description
title string The main title for the loop block
description string The description under the title for the loop block
type true or false show the property type filter box
auto_fill true or false enable the auto fill feature where it will detect and auto fill the white space empty gap by fetching more posts if available
posts_per_page number the number of post fetched initially and when pagination occurs
all string The show all button for the property type filter box

Property Search

Shortcode - vpropertysearch

[vpropertysearch
  types="1,2,3,4,5"
  action="url to post the form"
  id="unique wploop id to link this search form to"
  ajax="true"
  search_alignment="vertical|horizontal"
  search_title = "some text for the search box title"
  search_description = "some text for the search box description"
  fields__{field machine name} = hidden // disable a single field
  attributes__{attributes machine id} = hidden // disable a single attributes
]
          
Atts Value Description
search_title string The main title for the loop block
search_description string The description under the title for the loop block
types number separated by comma the property type taxonomy id that is allowed to be searched using the search form
action string in url format The url to redirect upon search submission
id string the unique id for the loop object that can be loop shortcode, loop widget or loop object from template to target the submitted search parameter and perform filtering to.
ajax true or false when ajax is enabled then no form redirection will be performed, instead it will use ajax to change the target loop object content upon search form submission
fields__xxx valid property field taxonomy replace xxx with valid property field taxonomy machine name to disable the field from displaying in the search form
attributes__xxx valid property attribute taxonomy replace xxx with valid property attribute taxonomy machine name to disable the attribute from displaying in the search form

Property Type

Shortcode - vpropertytype

 [vpropertytype

   // Post ID (required)
   postid="numeric"
 ]
          
Atts Value Description
postid numeric Define the property post id to retrieve the data from.

Property Attributes

General Settings

Attributes Settings

Visibility Settings

Property Fields

General Settings

Fields Settings

Visibility Settings

Property Listing

General Settings

Advanced Settings

Grid Settings

Property Maps

General Settings

Maps Settings

Search Settings

Property Metro

General Settings

Advanced Settings

Property Search

General Settings

Advanced Settings

Visibility Settings

Property Type

General Settings

Visibility Settings

Field System

Creating New Field - Registering New Field

Example on how to register a new field meta information to Victheme Property. This example is simplified for readability purposes. If you are using VTCore objects, please register the filter using its native filter system

// Adding the new Field to Property Field system
add_filter('vtcore_property_alter_fields', 'register_my_field');

// Function for registering the new field array
function register_my_field($registry) {

  $registry['my_custom_field'] = array(

    // Property Machine id, this must be unique
    // and no other field has it.
    // It must also only contain underscore and
    // alphanumeric character without any spaces.
    'field' => 'my_custom_field',

    // The human friendly ame
    'name' => __('Translate me'),

    // The icon type, currently proicon and fontawesome
    // is available to use
    'icon_type' => 'fontawesome',

    // The icon name without prefix, example :
    // fa-gears become gears.
    'icon' => 'gears',

    // The field initial state
    // this state will get overriden with dynamic
    // data from the property entity
    'enabled' => true,

    // Arrays of settings, this is related to
    // the field object metabox form. especially
    // the input name attributes which relates
    // to the generated Array attribute
    // This is mainly useful when you also need
    // to register custom taxonomy linked with
    // this field.
    'settings' => array(

      // Example to tell field to store as taxonomy
      // my_custom_meta must be in Array somehow.
      'my_custom_meta' => array(
        'mode' => 'taxonomy',

        // The taxonomy will be registered automatically
        'type' => 'my_custom_meta_taxonomy',

        // The label for this meta
        'label' => __('translate me'),

        // Specify custom taxonomy arguments that will
        // be passed to register_taxonomy()
        'args' => array(
          'name' => __('Translate me'),
          'taxonomy' => 'my_custom_meta_taxonomy',
          'hierarchical' => false,

          // Property field where this taxonomy
          // will be available for
          'fields' => array(
            'my_custom_field',
          ),

          // taxonomy slug entry, this is related
          // to query_args
          'slug' => 'some-valid-slug',
        ),



        // Example to tell field to store in the _property_data
        // entry in wp_post_meta table
        // Remember the "my_other_meta" must actually exists in
        // $_POST
        'my_other_meta' => array(
          'type' => 'data',
        ),
      ),
    ),


    // This array is useful to tell fields where to
    // store the data.
    'storage' => array(

      // The key "my_custom_meta" must exists in the metaform
      // Example for taxonomy storing
      'my_custom_meta' => array(
        'type' => 'taxonomy',
        'target' => 'my_custom_taxonomy',
        'mode' => 'taxonomy_id',
        'args' => array(
          'name' => __('Human Friendly Name'),
          'taxonomy' => 'my_custom_taxonomy',
          'hierarchical' => true,
          'show_in_nav_menus' =>  true,
          'slug' => 'some-valid-slug',
          'labels' => array(
            'name' => __('Human Friendly Name', VTCORE_PROPERTY_LANGUAGE),
          ),
        ),
      ),

      // Example for storing in custom post meta
      'another_custom_meta' => array(
        'type' => 'meta',
        'target' => '_custom_post_meta',
      ),
    ),



    // Setting field item visibility
    // This setting will be used when property entity
    // is rendering the field object.
    'visibility' => array(

      // Default settings
      'label' => true,
      'icon' => true,
      'search' => true,

      // You can also pass your own settings
      // These custom settings is usefull
      // when you build the objects for this field
      'some_field' => true,
      'another_field' => true,
      'yet_another_field' => true,
    ),


    // Define the object name that will be called
    // when the property object is rendering.
    // These four is the default "rendering state"
    // that the property object expect to have.
    // But you can also define your own state and
    // handle the rendering manually.
    'objects' => array(
      'text' => 'My_Custom_Plugin_Objects_Text',
      'metabox' => 'My_Custom_Plugin_Objects_Metabox',
      'search' => 'My_Custom_Plugin_Objects_Search',
      'display'=> 'My_Custom_Plugin_Objects_Display',
    ),


    // The groupping and weight is for the location when the
    // field metabox is rendering.
    // If you define unregistered group then the metabox group
    // panel will have no text on it.
    'group' => 'property_info',
    'weight' => 2,
  );


  // Finished registering, returning the registry
  return $registry;
}
          

Creating New Field - Field Object Text Mode

The text only object will be rendered when theme is calling the Property field to render a text only mode, example usage is for displaying text only address without markup or property price without any markup.

Example of building the field text only object for use when the field is rendering, It is assumed that the reader is already understand how VTCore object autoloading and class mechanism.

// Class for processing the data when in text only mode
class My_Custom_Plugin_Objects_Text
extends VTCore_Property_Element_Base {

  // Define the default context
  // This will be autopopulated value as defined
  // in the settings array
  protected $context = array(
    'some_key' => 'some value',
  );

  // The build element will be invoked when
  // VTCore Object is ready for rendering
  public function buildElement() {
    // add the element for processing while in text mode
    // @see VTCore_Property_Element_AddressText for example

    // Example for adding a simple text
    $this->addChildren(__('Hello world'));

    // Example of retrieving context
    if ($this->getContext('some_key')) {
      $this->addChildren($this->getContext('some_key'));
    }

    // Example of using template file instead
    // @note you can use VTCore_Wordpress_Init::getFactory('template')->locate('template.php');
    // If you are using victheme_core template factory and register the correct path
    // for the 'template.php' file.
    ob_start();
    include '/path/to/mytemplate/template.php';
    $content = ob_get_contents();
    $this->addChildren(new VTCore_Html_Element(array(
      'type' => 'section',
      'text' => $content,
      'attributes' => array(
        'class' => array(
          'myclass',
        ),
      ),
    )));

  }
}

          

Creating New Field - Field Object Display Mode

The display object will be rendered when theme is calling the Property field to render normally.

Example of building the field display object for use when the field is rendering, It is assumed that the reader is already understand how VTCore object autoloading and class mechanism.

// Class for processing the data when in default display mode
class My_Custom_Plugin_Objects_Display
extends VTCore_Property_Element_Base {

  // Define the default context
  // This will be autopopulated value as defined
  // in the settings array
  protected $context = array(
    'some_key' => 'some value',
  );

  // The build element will be invoked when
  // VTCore Object is ready for rendering
  public function buildElement() {

    // Example for adding a simple text
    $this->addChildren(__('Hello world'));

    // Example of retrieving context
    if ($this->getContext('some_key')) {
      $this->addChildren($this->getContext('some_key'));
    }

    // Example of using template file instead
    // @note you can use VTCore_Wordpress_Init::getFactory('template')->locate('template.php');
    // If you are using victheme_core template factory and register the correct path
    // for the 'template.php' file.
    ob_start();
    include '/path/to/mytemplate/template.php';
    $content = ob_get_contents();
    $this->addChildren(new VTCore_Html_Element(array(
      'type' => 'section',
      'text' => $content,
      'attributes' => array(
        'class' => array(
          'myclass',
        ),
      ),
    )));

  }
}

          

Creating New Field - Field Object Search Field

The search object will be rendered when search box for property is rendered either via coding, shortcode or widget.

Example of building the field search object for use when the property search box is rendering, It is assumed that the reader is already understand how VTCore object autoloading and class mechanism.

// Class for building the field search field
class My_Custom_Plugin_Objects_Search
extends VTCore_Bootstrap_Form_Base {

  // Define the default context
  // This will be autopopulated value as defined
  // in the settings array
  protected $context = array(
    'some_key' => 'some value',
  );

  // Define on how to build the search element field
  // for this new property field
  public function buildElement() {

    // Ask for parent standard buildElement
    parent::buildElement();

    // Set if this field should be visible or hidden
    $this->visibility = $this->getContext('visibility');


    // Build a text field example
    // In this example we are using shortcode class name BsText
    if ($this->visibility) {
      $this
        ->BsText(array(
          'text' => __('My Custom Field'),
          'name' => $this->getContext('queryid') . '_custom_field',
        ));
    }

    // Build a hierarchical select example
    // In this example we are using standard addChildren instead of shortcode
    // class name.
    if ($this->visibility) {
      $this
        ->addChildren(new VTCore_Wordpress_Form_WpTerms(array(
          'text' => __('Another custom field'),
          'name' => $this->getContext('queryid') . '_custom_field_two',

          // define the taxonomy to drill
          'taxonomies' => array('some_custom_taxonomy'),
        )));
    }
  }
}

          

Creating New Field - Field Object Metabox Field

The search object will be rendered when search box for property is rendered either via coding, shortcode or widget.

Example of building the field search object for use when the property search box is rendering, It is assumed that the reader is already understand how VTCore object autoloading and class mechanism.

// Class for building the field metabox field
class My_Custom_Plugin_Objects_Metabox
extends VTCore_Bootstrap_Form_Base {

  // Define the default context
  // This will be autopopulated value as defined
  // in the settings array
  protected $context = array(
    'type' => 'div',
    'attributes' => array(
      'class' => array(
        'row',
      ),
    ),

    'value' => array(
      'custom_field_one' => 'test',
      'custom_field_two' => 'another test',
    ),

    'visibility' => array(
      'custom_field_one' => true,
      'custom_field_two' => true,
      'icon' => true,
      'label' => true,
    ),
  );

  // Define on how to build the metabox field
  // for this new property field
  public function buildElement() {

    parent::buildElement();

    // Build the custom field one
    if ($this->getContext('visibility.custom_field_one')) {
      $this

        // Build the grid for left side, consisting of
        // text and description
        ->BsElement(array(
          'type' => 'div',
          'grids' => array(
            'columns' => array(
              'mobile' => '12',
              'tablet' => '4',
              'small' => '4',
              'large' => '4',
            ),
          ),
        ))
        ->lastChild()
        ->BsElement(array(
          'type' => 'h4',
          'text' => __('My custom field one'),
        ))
        ->BsDescription(array(
          'text' => __('Description for my custom field one'),
        ))
        ->getParent()


        // Build the grid for the right hand side
        // consisiting of the actual metabox field for custom field one
        ->BsElement(array(
          'type' => 'div',
          'grids' => array(
            'columns' => array(
              'mobile' => '12',
              'tablet' => '8',
              'small' => '8',
              'large' => '8',
            ),
          ),
        ))
        ->lastChild()
        ->BsText(array(
          'text' => __('My Custom Field One', VTCORE_PROPERTY_LANGUAGE),
          'name' => 'property[fields][my_custom_field_machine_id][custom_field_one]',
          'value' => $this->getContext('value.custom_field_one'),
          'grids' => array(
            'columns' => array(
              'mobile' => '8',
              'tablet' => '8',
              'small' => '8',
              'large' => '8',
            ),
          ),
        ));
    }


    // Build the custom field two
    if ($this->getContext('visibility.custom_field_two')) {
      $this

        // Build the grid for left side, consisting of
        // text and description
        ->BsElement(array(
          'type' => 'div',
          'grids' => array(
            'columns' => array(
              'mobile' => '12',
              'tablet' => '4',
              'small' => '4',
              'large' => '4',
            ),
          ),
        ))
        ->lastChild()
        ->BsElement(array(
          'type' => 'h4',
          'text' => __('My custom field Two'),
        ))
        ->BsDescription(array(
          'text' => __('Description for my custom field two'),
        ))
        ->getParent()


        // Build the grid for the right hand side
        // consisiting of the actual metabox field for custom field one
        ->BsElement(array(
          'type' => 'div',
          'grids' => array(
            'columns' => array(
              'mobile' => '12',
              'tablet' => '8',
              'small' => '8',
              'large' => '8',
            ),
          ),
        ))
        ->lastChild()
        ->BsText(array(
          'text' => __('My Custom Field Two', VTCORE_PROPERTY_LANGUAGE),
          'name' => 'property[fields][my_custom_field_machine_id][custom_field_two]',
          'value' => $this->getContext('value.custom_field_two'),
          'grids' => array(
            'columns' => array(
              'mobile' => '8',
              'tablet' => '8',
              'small' => '8',
              'large' => '8',
            ),
          ),
        ));
    }
  }
}
          

Rendering System

Rendering Property Element

Property Element Object is loaded and binded together to the global $post object via the_post() action hook via VTCore_Property_Actions_The__Post class.

Thus before rendering the property element, one must call the global $post first.

// Calling Wordpress Global $post object, this is recommended to be invoked
// when in Wordpress Loop.
global $post;

// Determine if we got valid property object attached
if (isset($post->property)) {
  
  // Perform the rendering method here.
}

          

Rendering Property Type

/**
 * Rendering Property Type
 */
// Building the property type using simple way
$post->property->renderType();

// or using generalized method
$post->property->render('type');


// Building the property type with customized context
if ($post->property->getMeta('type')) {

  // Inject custom context into this array
  // @see VTCore_Property_Element_Type object for valid context
  $context = array(

    // @see VTCore_Html element for valid contexes
    'type' => 'div',

    // HTML attributes
    'attributes' => array(
      'id' => 'some-unique-id',
      'class' => array(
        'property-element-price',
      ),
    ),

    // HTML5 data-*
    'data' => array(
      'attribute-one' => 'some-value',
      'attribute-two' => 'some-value',
      'somemore' => 'some more'
    ),

    // HTML inline css styling
    'styles' => array(
      'margin-left' => '30px',
      'font-weight' => 'bold',
    ),

    // Custom grid using bootstrap
    'grids' => array(
      'columns' => array(
        'mobile' => 12,
        'tablet' => 6,
        'small' => 4,
        'large' => 3,
      )
    ),

    'type' => $post->property->getMeta('type')
  );

  $object = new VTCore_Property_Element_Type($context);
  $object->render();
}

          

Rendering Property Field

/**
 * Rendering Property Field
 */
// Building a single Property Field the easy way
$post->property->renderField('property_location');

// Or using the generalized method
$post->property->render('field', 'property_location');

// Using complex method for customized output
if ($post->property->getMeta('fields.property_location')) {

  $context = $post->property->getMeta('fields.property_location');

  // Alter the $context value here
  $context['grids'] = array(
    'columns' => array(
      'mobile' => 12,
      'tablet' => 6,
      'small' => 4,
      'large' => 3,
    ),
  );

  $object = new VTCore_Property_Element_Location($context);
  $object->render();
}


/**
 * Rendering Property Fields
 */
// Rendering all property fields at once
$post->property->render('fields');

          

Rendering Property Attribute

/**
 * Rendering Property Attribute
 *
 * When rendering a single property attribute
 * it is essential that you know the id for the
 * attribute, it is a generated randomized key
 * so you must actually debug the property object
 * to get the actual array key.
 */
// Rendering as single attribute
$post->property->renderAttribute('property_aabbccdddee');

// or using the generalized method
$post->property->render('attribute', 'property_aabbccddee');


// Rendering a custom single attribute
$taxonomy = 'property_aabbccddee';
if ($post->property->getAttribute($taxonomy)) {

  // Get the default contextes stored in the property object.
  $context = $post->property->getAttribute($taxonomy)->getContexes();

  // Modify the default context, in this case we add
  // the value to the context.
  $context['value'] = $attribute;

  // Build the attributes display object
  $object = new VTCore_Property_Element_Attributes($context);
  $object->render();
}


/**
 * Rendering Property Attributes
 */
// Render all attributes at once
$post->property->render('attributes');

          

Templating System

Default Template Files

Plugin has several default template files that will be used when rendering the Property Elements.

Template Name File Path Description
property-content.php victheme_property/templates Template file used for rendering the property post information when in Single Post, by default if theme doesn't override it, this file will be invoked via Wordpress the_content() function.
property-empty.php victheme_property/templates This template file will be used by property loop when displaying property archive page and there are no teaser available to display.
property-grid.php victheme_property/templates This template file is used when rendering a single property teaser when grid mode selected
property-list.php victheme_property/templates This template file is used when rendering a single property teaser when list mode selected
property-loop.php victheme_property/templates This is the loop template used when rendering the property archive page or the property category listing page
property-masonry.php victheme_property/templates This template file is used for rendering a single property teaser when masonry mode selected
property-metro.php victheme_property/templates This template file is used for rendering a single property teaser when metro mode selected
property-mini-list.php victheme_property/templates This template file is mainly used by the property recent widget for displaying a simple property listing
property-thumbnail.php victheme_property/templates This template file is used for rendering a single property teaser with only its thumbnail displayed

Theme Suggested Template File

Plugin will use the WordPress Native template file suggestion workflow, you can use the standard single-property.php, archive-property.php, archive-{property taxonomy slug}.php

Suggested Filename Description
archive-property.php If located then wordpress will use this template file when rendering the property listing page.
archive-{property taxonomy slug|property_category}.php If located then wordpress will use this file template instead the archive-property.php when displaying property related taxonomy term listing page
single-property.php if located then wordpress will use this to display the single property post page.

Overriding Property Default Templates

Theme can easily overrides all the default property templates by registering the overriding file into the Victheme Core templating system.


/**
 * In this example we assume that all the overriding
 * template file will be located in the :
 * mycustomtheme/templates/property
 * and this registration code is called from :
 * mycustomtheme/functions.php
 */

    // Retrieve the victheme core template factory and add our
    // custom path to it.
    VTCore_Wordpress_Init::getFactory('template')
      ->register(
        dirname(__FILE__) .  DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'property',
        'templates' . DIRECTORY_SEPARATOR . 'property'
      );


/**
 * Stopping plugin for doing the_content() filter.
 *
 * By default the plugin will alter Wordpress the_content() function
 * when displaying the single property content.
 *
 * When altering the function, the plugin will invoke property-content.php
 * template and invoke all the property fields, type and attributes within it.
 *
 * You can override the property-single.php by copying the
 * file to theme_name/templates/property/property-content.php
 * and do the modification in the copied file.
 *
 * or you can disable this completely by defining VTCORE_PROPERTY_CUSTOM_CONTENT
 * constant.
 */

    // Completely disables the property the_content() filter
    define('VTCORE_PROPERTY_CUSTOM_CONTENT', true);

 /**
  * Invoking custom template that already registered to the
  * VTCore Template registry.
  *
  * In some cases, you may need to invoke the custom template
  * directly in some template file (or widgets or shortcode)
  *
  */
 // Invoking example template file called property/single.php
 // Warning : victheme_core plugin must be active or this will break!
 if (class_exists('VTCore_Wordpress_Init', true)) {

   // The static method will invoke the VTCore Template Library and
   // search for the files in the plugin directory or theme directory
   // and serve the file path to PHP.
   include VTCore_Wordpress_Init::getFactory('template')->locate('property-single.php');
 }


 /**
  * Replacing the default loop in archive.php template
  *
  * To display the custom archive property listing, it is advisable
  * to create archive-property.php by copying the theme default
  * archive.php and replace the main loop :
  *
  * while have_posts() .....
  *
  * endwhile ........
  *
  * to :
  *
  * <?php include VTCore_Wordpress_Init::getFactory('template')->locate('property-grid.php'); ?>
  *
  * which will replace the main loop with property custom loop
  */
// Overriding the default loop for the archive's page by
// manually replacing them with this code
if (class_exists('VTCore_Wordpress_Init', true)) {

  // Booting the custom loop + property grid mode template
  include VTCore_Wordpress_Init::getFactory('template')->locate('property-loop.php');
}


          

Credits

Credits

Thank you for the plugins authors that made this theme possible

  • CSS

    • BootStrap Framework - BootStrap Team
    • FontAwesome - Dave Gandy