Get varying post count with timestamp of published date
- prakashreddy.imduriParticipant2 years, 6 months ago #30749
Hi, Is there any way to show the updated post count as we change the range slider, currently this value is static even after changing the published date slider, whereas other filters array count value is dynamic.
This count is different from the total post count, its individual facet item count.
Published date is a custom acf field here .
Here the global facet is changing, depending on the filter options, but not the slider published date facet
prakashreddy.imduriParticipant2 years, 6 months ago #30752Yes, its not displayed in the facet widget, but can we get that data in the array, so that we can use it for custom requirements.
wpsolrKeymaster2 years, 6 months ago #30754If you want to inspect the data, you can use event
WPSOLR_Events::WPSOLR_FILTER_UPDATE_FACETS_DATA
:use wpsolr\core\classes\WPSOLR_Events; add_action( WPSOLR_Events::WPSOLR_FILTER_UPDATE_FACETS_DATA, 'my_facets_data', 10, 1 ); /** * @param array $facets_data * @return array */ function my_facets_data( $facets_data ) { /** Inspect $facets_data **/ return $facets_data; }
- This reply was modified 2 years, 6 months ago by wpsolr.
prakashreddy.imduriParticipant2 years, 6 months ago #30765Can we use search.php or facet.php in place of twig.php, as we want to add some custom php code to it. Currently search and other templates are getting rendered with twig templates.
You must be logged in to reply to this topic.