1. Home
  2. Installation
  3. JavaScript Plugin Installation
  4. Install Buying Buddy on PHP Platforms

Install Buying Buddy on PHP Platforms

The Buying Buddy widgets work with any custom website environment that uses PHP such as Laravel, or with CSS frameworks such as Bootstrap. This guide will walk you through the three main steps to get Buying Buddy running on your PHP website.

Get SEO Indexable Content with the Buying Buddy SDK For PHP: An optional SDK is available for advanced PHP programmers that allows you to update the page HTML with values coming from the API. See Buying Buddy PHP Class and API for SEO-friendly pages with pre-populated fields and forms.

Installation Steps

1

Add Buying Buddy Plugin to Your Site

Install the JavaScript library site-wide

Critical: The plugin JavaScript should only be added ONCE to your site's header. Ensure it loads at the end of the <head> section on every page.

Get Your Plugin Code:
  1. In your Buying Buddy dashboard go to Installation and Setup
    Menu Widgets > Plugin Installation and Setup
  2. Select your website and ensure it's set as a PHP site on the "Get Ready" tab
  3. Go to the "Add Plugin" tab and copy the JavaScript code
Install the Plugin:
  1. Edit your PHP site and add the JavaScript code so that it loads the end of the <head> section on every page
  2. Do not modify the code in any way
  3. Save your changes
Add the Disclaimer Widget (Recommended):

While setting up your site framework, add the disclaimer widget to your footer to keep pages clean. This displays required MLS disclaimers in your footer instead of under each widget.

<bb-widget data-type="Disclaimer"></bb-widget>

You can customize colors using the Widget Wizard. See Disclaimer Widget Reference for more details.

2

Create Foundation Pages

Set up required Results and Details pages

Important: Create 2 pages that should NOT be in your main navigation. Add the correct widget to each page (only one widget per page), and ensure page addresses match your Buying Buddy account settings.

Create the Pages:
  1. Create 2 new blank pages in your PHP site
  2. Suggested titles: "Results" and "Details"
  3. Recommended page slugs: "/listing-results" and "/listing-details"
  4. Do not add these pages to your main navigation menu
Add Widgets to Pages:

For the Results page:

  1. Edit your "Results" page
  2. Paste this code:
<bb-widget data-type="ListingResults"></bb-widget>
  1. Save your page
  2. Preview the page to verify the widget displays (on authorized domains only)

For the Details page:

  1. Edit your "Details" page
  2. Paste this code:
<bb-widget data-type="SearchDetails"></bb-widget>

Note: The details widget may display a SQL error if you preview it directly - this is normal and can be ignored.

Add a Search Form (for testing):

Create a search form on any other page (not on Results or Details pages) using:

<bb-widget data-type="SearchForm"></bb-widget>
Configure Foundation Page Settings:
  1. Return to your Buying Buddy dashboard
  2. Go to Menu Widgets > Plugin Installation and Setup > Foundation Pages tab
  3. Verify page addresses match your actual page slugs (e.g., "/listing-results" and "/listing-details")
  4. Update if needed to match your site's page structure (some sites may need ".php" extensions)

Important: Use the actual page names for YOUR site - don't assume they match the examples shown.

3

Enable Property Sharing

Set up social media sharing with correct listing photos

Important: If you are using the SDK for PHP, this section does not apply. The SDK will enable the writing of META data on the server to create property details pages with relevant META data that is needed for Social Share (and SEO).

For standard PHP installations (not using the SDK), you'll need to configure social sharing settings to ensure property listings display correctly when shared on social media platforms.

To allow visitors to share properties from your website on Facebook and other social media platforms with the correct listing photos and details, you'll need to set up a "bb" subdomain for your domain.

Setup Options: You can use either Cloudflare (recommended for free SSL certificates) or your current domain registrar.
The Social Media Sharing Setup Instructions will guide you through both options.

Next Step:

Note: Your Buying Buddy dashboard has customized instructions for your domain in the Installation and Setup section (Social Share Settings tab) of your Buying Buddy account.Widgets - Installation and Setup : Social Share tab
Menu Widgets > Plugin Installation and Settings > Social Share tab

Troubleshooting

SQL Error on Details Page

If you see an SQL error when viewing the Property Details widget directly, this is normal. The error occurs because you're viewing the widget without a property reference. The widget is installed correctly and this error is never seen in normal operation.

Domain Authorization Issues

If you see "Sorry this domain is not authorized", the widgets are working correctly but your domain isn't authorized. This commonly happens with staging/development domains.

Solutions:

  1. For live sites: Ensure your actual domain name is applied and working, then view the live site
  2. For development: Contact support via the Help Desk to temporarily add your staging domain as a free authorized domain

Next Steps

Your PHP site is now ready for advanced Buying Buddy features! Consider adding:

  • Featured Listings pages to display your own listings
  • Sold properties displays
  • Neighborhood pages with properties for specific areas
  • Lead capture forms connected to Buying Buddy CRM
  • Contact forms
  • Custom styling with Widget Themes

For inspiration, view our demonstration sites:

Need additional help? Contact our support team through your Buying Buddy dashboard.

Updated on February 14, 2026
Was this article helpful?

Related Articles

Buying Buddy Support