oneruffryder
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Search with Algolia] Slow AutocompleteTo add. Once results are displayed and i change the keyword, new results show instantly, so the issue is only on the first search fetch.
Forum: Plugins
In reply to: [WP Search with Algolia] Results sorting per indiceI’ve managed to go around and make it work. Thanks for your time
Forum: Plugins
In reply to: [WP Search with Algolia] Results sorting per indiceHey. With default algolia no plugin, i’ve managed to do this, by creating 3 different hits, 3 different indexed were hooked and initiated on the bottom with start. All hits are different and part of their own index and search widget.
I’m unable to replicate similar solution, so just to be sure, are you saying with wp plugin and instantsearch.php at line /* Instantiate instantsearch.js */ i use searchable_posts (instead of with my way creating 3 of these) and then at /* Hits widget */ i somehow output separate 3 indice results. Thing is if this is the case how? any example. I ve looked into link you ve sent but still can’t figure it out. Thank you!
Forum: Plugins
In reply to: [WP Search with Algolia] Limit scriptsHey, sorry didnt see a reply. Autocomplete is turned off despite not being used. If i turn it of, and leave the search page only active (Use Algolia with Instantsearch.js), will the plugin automatically push all the next content to algolia? Thanks
Forum: Plugins
In reply to: [WP Search with Algolia] Do not index certain postsHi, I thought you’re were saying to go with excluded id’s (not practical part).
In case someone stumbles this, I’ve made a solution, this is what I was looking foradd_filter( 'algolia_should_index_searchable_post', function( $should_index, WP_Post $post ) { if ( false === $should_index ) { return false; } $exclude_ids = get_option("unlist_posts", array()); return !in_array($post->ID, $exclude_ids); }, 10, 2 );
For some reason, even though I am not using autocomplete, it was the only way to make it work. Instantsearch reindexe didn’t work, only with autocomplete. So’ve changed algolia_should_index_searchable_post to algolia_should_index_post as well.
It was a custom post type, not sure is it a bug, as I was expecting it to work with instantsearch reindex.Thanks for your time Michael.
Forum: Plugins
In reply to: [WP Search with Algolia] Do not index certain postsHi Michael. With your snippet if i put true or false works fine. To go little back, on your reply, “Simply put each post that is being considered”. This is not practical for me, it would mean authors need an admin access and keep adding id’s to the array.
Last resort is to use ACF field, but i am looking to avoid confusion and double action. Unlist post and pages plugin works fine, has a checkbox but can’t figure how to use it inside filter, to not index checked posts. I wasnt talking about bringing the loop, just tried tell how it could be used, more description the better.
Plugin offers a way kind of by using
$hidden_posts = get_option( 'unlist_posts', array() );
example of one usage
// Hide unlisted posts from sitemap.xml in Yeost SEO // Add this to your theme's functions.php // See: https://kb.yoast.com/kb/sitemap-shows-excluded-posts-pages/ add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', function () { $hidden_posts = get_option( 'unlist_posts', array() ); return $hidden_posts; } );
I’ve tried it ofc with changing filter name, tried all i could find, but no luck, that’s why i am here looking for a help, basically how i can add it to your plugin filter so post selected with it, are not indexed,
Kind regards
Forum: Plugins
In reply to: [WP Search with Algolia] Do not index certain postsHey, well i’ve tried to spin more than 20 different things without luck. Until I just used yoast snippet and put an acf field there. In the end i thought maybe its a conflict with something else, but then i created a fresh wp install new algolia app and only a few posts for testing. Still no luck. Originally i ve used the one from website
function wds_algolia_exclude_post( $should_index, WP_Post $post ) { // If a page has been marked not searchable // by some other means, don't index the post. if ( false === $should_index ) { return false; } // ACF Field. // Check if a page is searchable. $excluded = get_field( 'exclude_from_search', $post->ID ); // If not, don't index the post. if ( 1 === $excluded ) { return false; } // If all else fails, index the post. return true; } add_filter( 'algolia_should_index_searchable_post', 'wds_algolia_exclude_post', 10, 2 ); add_filter( 'algolia_should_index_post', 'wds_algolia_exclude_post', 10, 2 );
In one custom loop i am using this way to exclude unlisted post. First i set this
$hidden_posts = get_option( ‘unlist_posts’, array() );
then inside custom arg i just say ‘post__not_in’ => $hidden_posts, and it works. Those two things i see as a way to target it, but no luck, any ideas how to modify for an example your snippet to be able to work with this? ThanksForum: Plugins
In reply to: [WP Search with Algolia] Do not index certain postsTo add if i use seo yoast snippet and change the field to acf field i’ve created, seems to work then. But idk is it the right way or way the default acf way doesnt work. Ideally still would want to target unlisted posts via unlist post plugin as no index sign.
Hey, thanks for the reply. There were logs per date. Pretty much the one i’ve sent here was repeating just per another date. So that’s from top up to next date.
It’s already turned on. I deleted logs, will keep an eye for it, if new comes, I’ll let you know.
I deleted a plugin. Cleared cache. Installed again, and set all up from fresh. It worked. Sounds silly but it did. Also i didnt have <p> closed. Try it. Hope it helps.
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] On submit nothing happensWeird, remove plugin, added again, works.
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] On submit nothing happensJust noticed in browser console i get something
Uncaught TypeError: Cannot read property ‘execute’ of undefined
at e.<anonymous> ((index):583)
at e.n.emitEvent (forms-api.js:2265)
at e.trigger (forms-api.js:1922)
at Object.trigger (forms-api.js:341)
at HTMLFormElement.<anonymous> (forms-api.js:78)
at forms-api.js:857
at HTMLBodyElement.<anonymous> (forms-api.js:901)On index i see this marked as red
window.grecaptcha
.execute(‘xxxnumbsandletters’, {action: ‘mc4wp_form_submit’})And when you add shortcode (not by widget) on frontend it shows kind of with this error
Notice: Undefined index: error in C:\MAMP\htdocs\X\wp-content\plugins\live-stock-prices-for-wordpress\template\ticker.php on line 4
Yes there’s an error on line 127 :”Notice: Trying to get property ‘post_content’ of non-object in”.
- This reply was modified 5 years, 8 months ago by oneruffryder.
I can uncheck it no problem, but there’s no option to save uncheck. I think you know what i am talking about. Homepage link gets back. Even if i do uncheck it, reload it, it’s automatically checked again. Not cool