holisticremedysearch
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Search with Algolia] Searchable Posts vs Postsbut how can i get removed from this page ? i think whenever new posts are created, the index gets created automatically again. i just created a new post and now index is back and has one record
- This reply was modified 6 months, 3 weeks ago by holisticremedysearch.
Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPwhat PHP file does this go to ?
after i try above, i can reference it in Automcomplete.php / instantsearch.php ?
Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPneither work for me but removing one index entirely will help troubleshooting efforts. i wanted to do in JS or PHP but couldn’t get a variable declared from Algolia meta data.
- This reply was modified 6 months, 4 weeks ago by holisticremedysearch.
Forum: Plugins
In reply to: [WP Search with Algolia] Number of Posts In an Indexi have reviewed that page prior to opening this but that but different indexes have different counts. Once i can delete one source of posts, might be easier to troubleshoot.
Forum: Plugins
In reply to: [WP Search with Algolia] Searchable Posts vs Postsso i can choose “searchable_posts” but how do i delete posts_posts. it keeps coming back and adding confusion. wasting an index in Algolia
Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPi did that a while back when you first mentioned, it is not honoring it
Forum: Plugins
In reply to: [WP Search with Algolia] Searchable Posts vs Postsnot following here, i want one index that has all my posts, both instant search and auto complete.
Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPno UI change seems to work.
Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPi did the following with no change observed in rendered HTML
- update functions.php
- press push settings (https://holisticremedysearch.com/wp-admin/admin.php?page=algolia-search-page)
- re index all content (https://holisticremedysearch.com/wp-admin/admin.php?page=algolia-search-page)
Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPi added that but it doesnt seem to do anything
function wds_algolia_custom_fields( array $attributes, WP_Post $post ) {
// Eligible post meta fields.
$fields = [
'overview'
];
// Loop over each field...
foreach ( $fields as $field ) {
// Standard WordPress Post Meta.
$data = get_post_meta( $post->ID, $field );
// Advanced Custom Fields.
// @see https://www.advancedcustomfields.com/resources/get_field/
$data = get_field( $field, $post->ID );
// Only index when a field has content.
if ( ! empty( $data ) ) {
$attributes[ $field ] = $data;
}
}
return $attributes;
}
add_filter( 'algolia_post_shared_attributes', 'wds_algolia_custom_fields', 10, 2 );
add_filter( 'algolia_searchable_post_shared_attributes', 'wds_algolia_custom_fields', 10, 2 );
function my_posts_index_settings( array $settings ) {
// In case you want/need overview to be searchable.
$settings['searchableAttributes'][] = 'unordered(overview)';
// How many words to truncate the field after
$settings['attributesToSnippet'][] = 'overview:15';
return $settings;
}
add_filter( 'algolia_posts_index_settings', 'my_posts_index_settings' );Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPwhich php file do I edit ? Tried this in the UI and got stuck on some other documentation I read
Forum: Plugins
In reply to: [WP Search with Algolia] Truncate Searchable Attribute in JS, HTML or PHPon my site, https://holisticremedysearch.com/ if you search anything in the searchbox, the results returned bring back the whole thing, i wanted to truncate that. tried traditional javascript and php string parsing but it kept taking the {{data.overview}} from the other post you helped with, as literal strings.
- This reply was modified 7 months, 1 week ago by holisticremedysearch.
Forum: Plugins
In reply to: [WP Search with Algolia] Searchable Posts vs Postsso is it safe to delete one ? i want to share results for both auto complete and full page results
Forum: Plugins
In reply to: [WP Search with Algolia] Searchable Posts vs Postsyeah, i do want to share that.
all good, now looking to use Algolia Snippet to show only X amount of characters, but i can open a new post for that if i get stuck