Good day. This plugin is good, but not developer–friendly. Examples and different usage cases are missing in some docs.
Anywho, I’m trying to create a raw custom WP Query to list certain listings that meet a certain condition, then render the listings using the default display, However. can’t seem to find a function that does this. Have tried to read the docs with no success.
This code snippet gets the HivePress listing object based on the WP_Post object in the loop, and then renders the listing template HTML, passing the listing object to its context.
We also plan to make the price filter (and other filters) available in the Listings block (and shortcode) in future updates. Currently only drop-down filters are available if you mark them as Filterable or Searchable.
Helped a lot. This is what I’ve been looking for. Where’s the full doc of this? What different configurations can I put inside that array, like setting columns etc. I don’t want to recreate my own listing style for consistency
There’s no 100% coverage in dev docs yet, but you can check them here Getting started | Developer Docs Also you can check hook and code references, it’s possible to customize almost everything via hooks (actions and filters). I also recommend using our AI Assistant, since there were thousands of code snippets suggested on the forum it may suggest pretty specific solutions.
For the purpose you described, I recommend another approach – hooking into the query via the pre_get_posts hook (for example), this way you don’t have to implement the Listings block/shortcode from scratch just to add the price filter. If you decide to implement it anyway, you can add columns as HTML wrappers, please check how these are added here hivepress/includes/blocks/class-listings.php at master · hivepress/hivepress · GitHub