Facets Plugin Box in the Homepage

Hello dears, I have installed Facets Plugin. I would like to position the box on the main page of the site. I am using Thanks Roy Theme. I appreciate any help with the code that I should use and where to modify it.

Hi. You might want to read the plugin instructions file to see some code examples: https://github.com/DBinaghi/plugin-Facets#readme

Hope this helps.

Hi DanieleB, thank you. I pasted the suggested code to theme\index.php file, but it doesn’t show the box in the Homepage. Also, I would like it appear in Search results page.

Code used:

<?php if (get_theme_option('use_advanced_search') === null || get_theme_option('use_advanced_search')): ?> <?php echo search_form(array('show_advanced' => true)); ?> <?php else: ?> <?php echo search_form(); ?> <?php endif; ?>
<?php echo get_specific_plugin_hook_output('Facets', 'public_facets', array('view' => $this)); ?>

Which version of Facets are you using? My fork or the original code?

And: the plugin doesn’t work (yet) for the Search page, only for the browse items and collections pages.

Hi. I’m using 2.8.1 version.
Do you think is it possible to insert the facets box into the homepage or in a simple page?
Thank you.

The plugin is checking which page it’s called in, as it only works for items and collections browse pages. So that’s why it won’t work in your index page.

The idea of the plugin is to help refining an existing search, so it would not make sense to have it in an index page. And I don’t really see a use for a Simple Page, but maybe you’ve got something specific in mind, so could you please explain us better the use you were thinking of?

Thanks for your replay. The plugin is useful for our archive since we would like the user to select directly two Dublin Core elements (Title and Date) without searching or navigating the site.
Also, it would be nice to use it in search results.