WP AgentBox Sync Documentation

This comprehensive documentation provides a step-by-step guide for installing, activating, configuring data sync, initiating sync, managing listings, and troubleshooting WP AgentBox Sync. If you have further questions or encounter issues not covered here, feel free to reach out to our support team.

Table of Contents

  1. Installation
  1. Activation
  1. Configuration and Sync
  1. Troubleshooting

1. Installation

1.1 Obtaining API Key and Client ID

Before installing WP AgentBox Sync, ensure you have obtained the API Key and Client ID from AgentBox.

Follow these steps:

  1. Visit AgentBox website.
  2. Navigate to contacts page.
  3. Submit a request to Obtain the API Key and Client ID.

1.2 Server Requirements

Ensure your server meets the following requirements:

1.3 Plugin Installation

Follow these steps to install WP AgentBox Sync:

  1. Download the plugin from our website.
  2. Upload and activate the plugin in your WordPress dashboard.
  3. Enter the License Email and Key obtained from Your Purchase Email.
  4. Enter the API Key and Client ID obtained from AgentBox.

2. Activation

2.1 Activating the License

To unlock WP AgentBox Sync’s full features, you need to activate your license.

Follow these steps:

  1. Go to the WP AgentBox Sync Dashboard page in your WordPress admin panel.
  2. Locate the license activation section.
  3. Enter your email and the license key.
  4. Click the “Activate License” button.

2.2 Accessing the Dashboard

After activation, you can access the plugin’s dashboard by following these steps:

  1. Log in to your WordPress admin panel.
  2. Navigate to the WP AgentBox Sync Dashboard.

3. Configuration and Sync

3.1 Configuring Data Sync

After activating your license, you can customize the data (listings) that WP AgentBox Sync brings from AgentBox to your WordPress site. Follow these steps:

  1. Navigate to the WP AgentBox Sync Dashboard in your WordPress admin panel.
  2. Click on the “Sync Settings” tab.
  3. Adjust the filters based on your preferences for property listings.
  4. Click the “Save” button to apply your configuration.

3.2 Initiating Data Sync

When you are ready to bring property listings matching your criteria from AgentBox to WordPress, follow these steps:

  1. Visit the “Sync” tab in the WP AgentBox Sync Dashboard.
  2. Click the “Sync” button.

3.3 Managing Synced Listings

After the sync is complete, you can view and manage your property listings. Follow these steps:

  1. Navigate to the “Listings” section in your WordPress admin panel.
  2. You will find the synced listings with details imported from AgentBox.

3.4 Editing and Preventing Overwrites

You have the flexibility to edit, add, or remove details about the synced listings. However, keep in mind the following:

  1. Visit the specific listing you want to lock in your WordPress admin panel.
  2. Look for a metabox labeled “Lock Listing.”
  3. Ensure the checkbox is ticked to lock the listing from being updated.
  4. Click “Save” to apply the changes.

By following these steps, you can have better control over which listings are updated during the sync process.

4. Troubleshooting

4.1 Contacting Digital Apps

If you encounter issues during installation or activation, reach out to us our support for assistance.

4.2 License Activation Issues

If you face problems with license activation, double-check the entered details and ensure your server has internet access. If issues persist, contact our support.

4.3 Sync Issues

If you experience difficulties with the sync process or encounter discrepancies in your listings, refer to our troubleshooting guide in the support documentation. If the issue persists, contact our support team for further assistance.

Metaboxes – Listing Fields in WP AgentBox Sync

WP AgentBox Sync provides a comprehensive solution for managing listings retrieved from AgentBox within your WordPress site. To ensure flexibility and efficiency, the plugin comes with a set of metaboxes to store essential listing data, using the default core WordPress meta box functionality.

Essential Fields Out of the Box

Upon installation, WP AgentBox Sync enables essential fields by default, providing a seamless integration with AgentBox data. However, we understand that each user’s needs may vary, and not everyone requires all the available fields. To address this, we have implemented a customisable approach that allows users to tailor their listing fields according to their specific requirements.

Customising Listing Fields

Adding a New Field

To add a new field, use the add_filter function provided by WordPress. This filter creates a user interface field that is visible when editing a listing. Below is an example of how to use the filter:

// Example of adding a new field
function custom_listing_field($fields) {
    $fields['custom_field'] = array(
        'label' => __('Custom Field', 'your-plugin-text-domain'),
        'type' => 'text',
        // Add any other necessary parameters
    return $fields;
add_filter('your_plugin_listing_fields', 'custom_listing_field');

Replace 'your_plugin_listing_fields' with the actual filter hook used by your plugin.

Whitelisting the Field

After adding a new field, you need to whitelist its name to allow the meta value to be securely stored in the WordPress database. This is crucial for maintaining data integrity and security. Whitelisting can be done as follows:

// Example of whitelisting a field
function whitelist_custom_field($whitelist) {
    $whitelist[] = 'custom_field';
    return $whitelist;
add_filter('your_plugin_listing_whitelist', 'whitelist_custom_field');

Mapping AgentBox Field Reference

Lastly, use the add_filter function to map the AgentBox field reference to the newly created metabox. This step ensures a smooth integration between the external data source and your custom fields:

// Example of mapping AgentBox field reference
function map_agentbox_field($mapping) {
    $mapping['custom_field'] = 'agentbox_field_reference';
    return $mapping;
add_filter('your_plugin_agentbox_mapping', 'map_agentbox_field');

Adjust the filter hooks and field names according to your actual implementation.

By following these steps, you can easily customise listing fields to suit your unique requirements while maintaining the security and integrity of your data in WordPress.

Templating with WP AgentBox Sync

WP AgentBox Sync offers a flexible templating system, inspired by the approach taken by WooCommerce. By creating a folder named /templates under your theme directory, you can easily customise the display of listings.

Getting Started

  1. Create /templates Folder:
  1. Explore Available Templates:

Utilising WordPress Default Metabox

WP AgentBox Sync seamlessly integrates with the default WordPress metabox, allowing you to leverage the power of standard WordPress functionality. To further customise the display of your listings, you can create custom post types that default to the WordPress structure.

Creating Custom Post Types

  1. Utilise Default WordPress Metabox:
  1. Retrieve Meta Data:
// Example of retrieving meta data for a listing
$listing_id = get_the_ID();
$custom_field_value = get_post_meta($listing_id, 'custom_field', true);

This approach simplifies the process of working with listing data, providing you with the familiarity and ease of use associated with standard WordPress practices.

Template Customisation

Feel free to customise templates based on your specific requirements. By placing your customized templates in the /templates folder, you can effortlessly enhance the visual presentation of your listings.

Creating a Template for Custom Post Type ‘Listing’

To create a custom template for the ‘listing’ post type in WP AgentBox Sync, follow these steps:

  1. Create a New Template File:
  1. Start with Template Header:
    * Template Name: Single Listing
    * Description: Custom template for the 'listing' post type.

  1. Retrieve Listing Data:
   $listing_id = get_the_ID();
   $custom_field_value = get_post_meta($listing_id, 'custom_field', true);
   // Retrieve other listing data as needed
  1. Design the Template Structure:
   <div class="listing">
       <h2><?php the_title(); ?></h2>
       <p>Custom Field: <?php echo $custom_field_value; ?></p>
       <!-- Add more HTML structure and listing details -->
  1. Include Additional Elements:
  1. End with Template Footer:
   <?php get_footer(); ?>
  1. Save the Template:
  1. Apply the Template:
    • In the WordPress admin, edit a ‘listing’ post.
    • In the Page Attributes section, select your custom template from the Template dropdown.
  2. Preview and Adjust:
    • Preview the ‘listing’ post to ensure the template is applied correctly.
    • Adjust the template as needed based on your preview.

By following these steps, you can create a custom template for the ‘listing’ post type in WP AgentBox Sync, providing you with the flexibility to tailor the display of your listings according to your unique requirements.

Thank you for choosing WP AgentBox Sync!