Skip to main content
Home Documentation Havenlytics Filter Hooks

Havenlytics Filter Hooks

2 mins read
Version: 2.0.2
13

Havenlytics provides a robust set of filter hooks that let developers modify plugin output or behavior at specific points safely. Filters allow customization of property listings, templates, search results, and other content dynamically.

Global Filters

Filter HookDescriptionUsage & Benefits
hvnly_layout_grid_classesFilters the CSS classes applied to the layout grid.Add custom classes or modify layout styles dynamically.
hvnly_main_content_classesFilters classes for the main content area.Customize spacing, width, or layout of property content area.
hvnly_sidebar_classesFilters CSS classes for sidebar wrapper.Adjust sidebar width, add responsive behavior, or styling classes.
hvnly_should_display_sidebarControl whether the sidebar is shown.Hide or show sidebar based on property type, page, or user role.

Single Property Filters

Filter HookDescriptionUsage & Benefits
hvnly_single_property_elementsFilter the main elements structure on a single property page.Reorder sections, remove or inject custom elements safely.
hvnly_single_property_layout_gridFilter grid container for single property layout.Customize layout dynamically, change grid spacing or responsive behavior.
hvnly_single_property_main_contentFilter the main content area of a property page.Insert custom cards, widgets, or additional property info.
hvnly_single_property_sidebarFilter sidebar content area on single property pages.Add custom widgets, ads, or dynamic content.

Search Filters

Filter HookDescriptionUsage & Benefits
hvnly_search_loop_classesFilters CSS classes applied to the search results container.Modify search layout, grids, or list appearance dynamically.
hvnly_search_query_argsFilter the WP_Query arguments for search listings.Control which properties are displayed, custom order, or filters.
hvnly_main_property_image_sizeFilter the default property image size.Change image dimensions for faster load times or high-resolution display.

Example Usage


add_filter('hvnly_should_display_sidebar', function($display, $context) {
    if($context === 'single' && is_singular('hvnly_property')) {
        return false; // Hide sidebar on single property pages
    }
    return $display;
}, 10, 2);

Benefits: Safe, dynamic, and update-proof customization of layouts, content, and plugin behavior. Filters allow developers to modify output without touching core plugin files.

Was this documentation helpful?

Havenlytics Documentation v2.0.0

Search Documentation