Home Support General HivePress Does search alerts still work if you use something like WPGridBuilder?

Does search alerts still work if you use something like WPGridBuilder?

  • Author
    Posts
  • mgmccardle

    I presume they won’t, but wanted to check before buying the plugin.

    Interested in the responsive search capabilities of WPGridBuilder.

    ihor developer

    It seems that WPGridBuilder has its own search results pages, integrating Search Alerts may require some customizations. I recommend using the built-in HivePress grid and styling it if required, it’s also responsive (changes the number of columns depending on the screen size, also replaces the filters form with the “Filter” button on mobile).

    mgmccardle

    Thanks. What I’m mainly after with faceted search is the preview results (quantity of listings that match are previewed next to the filter), updating search results without having to click filter.

    ihor developer

    The improvements like instant filtering are on the roadmap, I recommend using the built-in search functionality if this works for you, because third-party grid and filters will load extra scripts and styles (slowing down the page), and will most likely require integration.

    mgmccardle

    Thanks for the advice. Curious do you have your roadmap or development backlog published somewhere? Would be nice to see what features are coming.

    ihor developer

    I’ve just created a public Trello board https://trello.com/b/ANq16ymJ/hivepress-roadmap Will start moving all the features from the backlog there, please feel free to vote for features or comment there.

    mgmccardle

    Different but related question, I’m trialing WPGridBuilder and it’s pretty easy to create faceted search and also creates the results page for you. It’s generated shortcode, but where do I insert this so it shows up on the site?

    mgmccardle

    Disregard last question, I figured it out. Next issue is the geolocation tags are in separate fields but their plugin takes a single field.

    ihor developer

    Yes, the location text is stored in “hp_location” meta field, latitude and longitude in separate “hp_latitude” and “hp_longitude” fields. Sorry, but I can’t guarantee compatibility with WPGridBuilder, integrating with its facet search may require customizations.

    mgmccardle

    I’m working on it with them, they gave me some PHP code that can combine the two fields for their facet, I’ll share it here once I get it working.

    mgmccardle

    Here’s the code that made it work. If you’re using the map facet, just replace the facet_type with map. Hopefully I get this pasted in correctly so it looks like code.

    add_filter(
    	'wp_grid_builder/indexer/index_object',
    	function( $rows, $object_id, $facet ) {
    
    		if ( empty( $facet['filter_type'] ) || 'geolocation' !== $facet['filter_type'] ) {
    			return $rows;
    		}
    
    		return [
    			[
    				'facet_value' => get_post_meta( $object_id, 'hp_latitude', true ),
    				'facet_name'  => get_post_meta( $object_id, 'hp_longitude', true ),
    			],
    		];
    
    	},
    	10,
    	3
    );
    mgmccardle

    Sorry meant to say replace the filter_type with map.

    ihor developer

    Thanks for posting the solution!

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.