JReviews logo Docs
Menu
Version

jreviews:listing:structured_data

Allows filtering and modifying the Schema.org structured data array before it's converted to JSON-LD format and added to the listing detail page. Use this to customize SEO structured data for better search engine visibility.

Filter
System
Since 6.0.0

You need to have a working knowledge of Hooks before you get started.

Fires when adding Schema.org structured data to listing detail pages, after data is generated but before JSON-LD conversion

Parameters

Name Type Description
$schemaArray array The structured data array following Schema.org specifications, before JSON-LD conversion
$listing \JReviews\App\Models\Listing The listing model being displayed

Boilerplate Code

Use the boilerplate code to start using the filter, and add your own logic to modify the first argument and return it.

fwd_add_filter('jreviews:listing:structured_data', function($schemaArray, $listing)
{
    // Your code here
    
    return $schemaArray;
});
Development & Support
Customizations are not included with support. We provide this information to make it easier for developers to extend the functionality. From time to time we may have some availability for custom work. Get in touch to see if there's an opportunity to work together.

Source Files

  • app/Actions/AddListingDetailStructuredDataAction.php