Havenlytics offers a comprehensive set of action hooks that developers can use to modify functionality, inject content, or execute custom code at specific points without editing core files. These hooks are safe to use and preserved during plugin updates.
Core Plugin Actions
Hooks that run during key plugin lifecycle events, such as plugin load, installation, or updates.
| Hook | Description | Usage & Benefits |
|---|---|---|
| hvnly_before_main_content | Triggered before the main page content wrapper. | Insert banners, notices, or custom content above the main property listings or pages. |
| hvnly_after_main_content | Triggered after the main page content wrapper. | Add footers, call-to-actions, or promotional content after all property content. |
| wp_body_open | Standard WordPress hook used for adding code at the top of the body. | Insert scroll indicators or scripts for single property pages. |
Single Property Actions
Hooks for customizing single property pages, content sections, and layout elements.
| Hook | Description | Usage & Benefits |
|---|---|---|
| hvnly_single_property_elements | Main hook for single property structure. | Reorder content blocks, add custom widgets, or inject new sections. |
| hvnly_single_property_header | Wraps the header section of single property. | Add breadcrumbs, custom actions, or call-to-action buttons in the header. |
| hvnly_single_property_layout_grid | Wraps the layout grid for content and sidebar. | Modify grid layout dynamically or insert additional sections. |
| hvnly_single_property_sidebar | Hook for sidebar content on single property pages. | Add widgets, contact forms, or third-party integrations. |
| hvnly_single_property_similar_properties | Wraps the similar properties carousel section. | Customize related listings, add headings, or change carousel behavior. |
Search & Listing Actions
| Hook | Description | Usage & Benefits |
|---|---|---|
| hvnly_before_search_loop | Executed before property search results loop. | Add custom messages, filters, or category highlights above listings. |
| hvnly_after_search_loop | Executed after property search results loop. | Add pagination, promotional banners, or notifications below search results. |
| hvnly_after_search_pagination | Fires after the search pagination. | Append call-to-actions or custom scripts after listing navigation. |
Example Usage
add_action('hvnly_before_main_content', function() {
echo '<div class="custom-banner">Welcome to our real estate listings!</div>';
});
Benefits: Customize content, inject widgets, extend layouts, and maintain update-safe modifications without touching core plugin files.