bluedogranch
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] PHP Fatal error: Uncaught TypeErrorAh, thanks!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] PHP Fatal error: Uncaught TypeErrorThanks, I disabled Relevanssi in the admin search, but what do you mean by “use the Relevanssi Admin Search to do the admin searching”?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] PHP Fatal error: Uncaught TypeErrorThanks! I know this is difficult. I found this; it might be related:
/wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/WP_Query/Custom_Tables_Query.php
/**
* Replaces theWP_Meta_Queryinstance built in theWP_Query::get_postsmethod with an instance of
* theWP_Meta_Queryextension that will redirect some custom fields queries to the plugin custom tables.
*
* This method is expected to be hooked to theposts_searchhook in theWP_Query::get_postsmethod.
* The method will not change
*
* @since 6.0.0
*
* @param string $search The WHERE clause as produced by theWP_Queryinstance.
* @param WP_Query $wp_query A reference to theWP_Queryinstance whose search WHERE clause is currently being
* filtered.
*
* @return string The WHERE clause as produced by theWP_Queryinstance, untouched by the method.
*/
public function replace_meta_query( $search, $wp_query ) {
if ( $wp_query !== $this ) {
// Only target the class own instance.
return $search;
}Forum: Plugins
In reply to: [Relevanssi - A Better Search] PHP Fatal error: Uncaught TypeErrorThanks! I don’t know about any custom queries; where would I look? I am using Twig https://flyntwp.com/ for a theme.
So how do I disable “Related Images”?
Thanks, but that’s really stupid. Why should it be so hard to disable “Related Images”? Not everyone wants to see related images.
And “our team will only be able to provide limited support for any issues that may come up from using these settings”. That’s even worse. You make it hard to change settings and then claim you’re not responsible?
Ah, that makes sense. He may have two different accounts.
In DNS, can I have two TXT
_mailpoet.comicstriphistory.comrecords with different contents?He got yet another email saying again that he needs to update the same TXT record but with a different content key this time. Why is this? Does there need to be duplicate TXT records with different keys?
Ah, OK, I see that.
Now, in this context,
'posts' === $_REQUEST['target']will also include comments onpages? Since a page is really a post in the WordPress world?Ah, I see what I was doing wrong. I needed isset.
That works great! Thanks!
Thanks much!
But I am still doing something wrong. All other searches work, but the include comments radio buttons don’t. And I selecting for
postscorrectly?I’m using
<label for="nocomments">Posts Only</label>
<input type="radio" id="persistentnocomments" class="_searchbox" name="target" value="posts">
<label for="includecomments">Include Comments</label>
<input type="radio" id="persistentcomments" name="target" class="_searchbox" value="posts_and_comments">and
add_filter( 'relevanssi_match', 'rlv_comments_only' );
function rlv_comments_only( $match ) {
if ( $_REQUEST['target'] ) {
if ( $match->comment > 0 && $match->title < 1 && $match->content < 1 && $match->tag < 1 && $match->link < 1 && $match->author < 1 && $match->category < 1 && $match->excerpt < 1 && $match->taxonomy < 1 && $match->customfield < 1 ) {
$match->weight = 0;
}
}
return $match;
}Could you give me a few more clues on what I can try? I’m not using the search form shortcode; my search form is the usual PHP, and I have category dropdowns and post/page included radio buttons, both of which append search parameters to the URL. But comment searches are not set in the search string and URL. Thanks!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Restrict to one Custom Post TypeThanks!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Restrict to one Custom Post TypeAh, hah; that worked. Thanks!
Now I will look in the search results template and see what might be overriding the results so I don’t need that filter.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Restrict to one Custom Post TypeNo, still by date. Maybe this is a problem with the search results template?