Website Integrations

WordPress Integration

Connect a property website powered by WordPress to Manhattin so you can display live unit availability and capture leads directly in the platform. Use the guided plugin setup or the lightweight manual snippet—both options are documented below.

Last reviewed: October 22, 2025Requires an API key issued by the Manhattin team.

Before You Start

  • Ask the Manhattin team for an API key for your property. Email support with the property name and the website you want to connect, and we will issue a key scoped to that property.
  • Decide whether you will use the Manhattin WordPress plugin (recommended) or add the lightweight integration snippet directly to functions.php.
  • Have the property website URL ready. Send it with your request so we can allow that domain on the key before you go live.

Option 1 — Official Plugin (Recommended)

This option provides pre-built shortcodes for unit availability and a contact form with caching and lead tracking. It is the fastest way to enable a fully featured integration.

  1. Upload & activate the plugin
  2. Configure the Manhattin connection
    • Open Settings → Manhattin Integration.
    • Paste the API key we issued you and set the API URL to https://manhattin.com (or your branded domain, if you have one).
    • Click Save Changes; you should see a confirmation that the API connection was successful.
  3. Publish an availability page
    • Create a new WordPress page named "Available Units".
    • Add the shortcode [manhattin_availability show_filters="yes"] where you want the inventory list to render.
  4. Enable the lead capture form
    • Edit your "Contact" page.
    • Insert the shortcode [manhattin_contact_form]; submissions are logged as marketing leads in Manhattin automatically.
  5. Test the full flow
    • Visit the availability page and confirm vacant units appear with pricing.
    • Submit a contact form entry and verify it lands in Manhattin Marketing → Leads.

Option 2 — Lightweight Snippet

Use this method if you prefer to avoid plugins. Add the helper functions directly to your theme's functions.php and drop the shortcode wherever you want to render inventory.

// Quick Manhattin integration (functions.php)
define('Manhattin_API_KEY', 'pk_your_api_key_here');
define('Manhattin_API_URL', 'https://manhattin.com');

function manhattin_get_units() {
  $response = wp_remote_get(Manhattin_API_URL . '/api/public/availability', [
    'headers' => ['X-API-Key' => Manhattin_API_KEY],
    'timeout' => 15,
  ]);

  if (is_wp_error($response)) {
    return [];
  }

  $body = json_decode(wp_remote_retrieve_body($response), true);
  return $body['available_units'] ?? [];
}

add_shortcode('units', function() {
  $units = manhattin_get_units();
  ob_start();

  foreach ($units as $unit) {
    echo &apos;<div class=&quot;manhattin-unit-card&quot;>&apos;;
    echo &apos;<h3>Unit &apos; . esc_html($unit[&apos;unit_number&apos;]) . &apos;</h3>&apos;;
    echo &apos;<p>&apos; . esc_html($unit[&apos;bedrooms&apos;]) . &apos; BR / &apos; . esc_html($unit[&apos;bathrooms&apos;]) . &apos; BA</p>&apos;;
    echo &apos;<p>$&apos; . number_format($unit[&apos;market_rent&apos;], 0) . &apos; / month</p>&apos;;
    echo &apos;</div>&apos;;
  }

  return ob_get_clean();
});

After adding the snippet, place [units] on any page or post to display available units. Optionally wrap the markup in your theme components for custom styling.

Troubleshooting & Best Practices

"API connection failed"

  • Double-check the API key and Manhattin URL—copy/paste issues are the most common cause.
  • Ensure the site domain is listed in the API key's allowed origins.
  • If you use a firewall (Sucuri, Cloudflare), allow outbound requests to the Manhattin API host.

No units are showing

  • Clear any server-side or plugin cache (WP Rocket, W3 Total Cache, etc.).
  • Verify the property has active units marked as "vacant" inside Manhattin.
  • Click Clear Cache in the plugin settings to fetch a fresh snapshot.

Leads are not arriving in Manhattin

  • Confirm your API key is still active. If you are not sure, contact support with the key prefix and we will check it for you.
  • Make sure required fields (first name, last name, email) are present on the WordPress form.
  • Check the Marketing → Leads area in Manhattin; filter by source "wordpress_website".

Performance tips

  • Keep the default caching window (1 hour) unless you need near real-time updates.
  • Optimize images attached to units; the plugin will display whatever is stored in Manhattin.
  • Enable lazy loading for long availability lists to improve page speed scores.

Need a hand?

If you run into issues or want help customizing the integration, contact our support team. Provide the property name and API key prefix so we can assist quickly.

Open a support request