Support » Plugin: Search by Algolia – Instant & Relevant results » Give autocomplete set height / Change Post title

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor rayrutjes

    (@rayrutjes)

    Hi Jordan,

    To begin with, we are currently auditing our users to know what they are expecting from a plugin like this one.

    I understand that in your case you are already facing 2 limitations.

    Regarding the titles, currently we re-use the post type name. To be able to change that you would need to use a filter which is not ideal I have to admit.

    Regarding the height, would you mind explaining, or pin pointing what you want to change?

    I’d be really interested into hearing, from your point of view, what is missing in our plugin.

    Are you currently using only the autocomplete dropdown?

    Best,

    PS: I’ll try to pin point the solutions to your problems once I know a bit more about the “height” issue.

    jordanmulkey

    (@jordanmulkey)

    I am using the autocomplete and the actual search page. With the height issue I mean that I would like to make the box only fill up 70% of the page instead of dropping off the page when there are a bunch of results. The plugin is amazing its really hard to try and analyze what could be added to it because it already has so many amazing features. I would love to be able to change the post type name easily. A lot of people do not want to call it posts because that is often confusing to someone that doesn’t know a lot about web design. I would also love to be able to show the excerpt of the post on the search page instead of content. I have tried changing it on your website but it never seems to work properly

    Plugin Contributor rayrutjes

    (@rayrutjes)

    Hi Jordan,

    Sorry about the delay here 😉

    Regarding the text labels displayed in the autocomplete dropdown, I added a section into the docs to help you do it. Please check it out: https://community.algolia.com/wordpress/customize-autocomplete.html#customize-autocomplete-labels

    Regarding the autocomplete height, you will need to add the following CSS rules to your theme:

    .aa-dropdown-menu {
        max-height: 80%; /* Feel free to adjust */
        overflow: scroll;
    }

    I hope that helps!

    The height code worked perfectly thanks!

    I put in the functions onto functions.php and it changed the name of searchable posts but the name post still shows up instead of video

    jordanmulkey

    (@jordanmulkey)

    Was able to fix the function instead of `add_filter(‘algolia_autocomplete_config’, function(array $config) {
    $new_labels = array(
    ‘searchable_posts’ => ‘All posts’,
    ‘posts_product’ => ‘Video’,
    );

    foreach ($config as &$item) {
    if(isset($new_labels[$item[‘index_id’]])) {
    $item[‘label’] = $new_labels[$item[‘index_id’]];
    }
    }

    return $config;
    });`

    I changed out 'posts_product' => 'Video', to 'posts_post' => 'Video',

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.