tblakely
Forum Replies Created
-
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] WooCommerce Subscription IntegrationOk, thanks for your reply.
Thanks for your reply. I am using the Yoast SEO plugin, which I would prefer to stay activated since SEO is important for the website.
Is there code that I could add to prevent multiple emails from being triggered?
Thanks for your reply. Can you explain what you mean by “make sure you are using the correct Form Scheme in the frontend”?
Also, can you confirm what value I should enter in the “Min.” and “Max” Length fields if I want to limit the text field to 140 characters? I added a “1” in the “Min.” field and “140” in the “Max.” field. Is that correct?
Ok, thanks for clarifying – just wanted to make sure I tried all of your recommendations correctly. Will test removing the plugins…I’m hoping it doesn’t come down to having to switch my theme.
I will try disabling my plugins, but can you confirm which code I should add to my theme functions.php file:
add_filter( "adverts_list_query", "search_by_keyword" ); add_filter( "adverts_form_load", "search_by_keyword_name_change" ); function search_by_keyword_name_change( $form ) { if( $form['name'] != "search" ) { return $form; } foreach( $form["field"] as $key => $field ) { if( $field["name"] == "query" ) { $form["field"][$key]["name"] = "query2"; } } return $form; } function search_by_keyword( $args ) { $args["suppress_filters"] = true; $args["s"] = adverts_request( "query2" ); return $args; }
OR
function search_by_keyword( $args ) { $args["suppress_filters"] = true; $args["s"] = adverts_request( "query2" ); return $args; }
When I added that last function to the original code you provided (see code below) – It’s still not searching the listings. Also see it on the site here: https://bit.ly/2sh4UQd
add_filter( "adverts_list_query", "search_by_keyword" ); add_filter( "adverts_form_load", "search_by_keyword_name_change" ); function search_by_keyword_name_change( $form ) { if( $form['name'] != "search" ) { return $form; } foreach( $form["field"] as $key => $field ) { if( $field["name"] == "query" ) { $form["field"][$key]["name"] = "query2"; } } return $form; } function search_by_keyword( $args ) { $args["suppress_filters"] = true; $args["s"] = adverts_request( "query2" ); return $args; }
When I added only the code (see below), still no results with listings.
function search_by_keyword( $args ) { $args["suppress_filters"] = true; $args["s"] = adverts_request( "query2" ); return $args; }
Am I doing something wrong?
- This reply was modified 7 years, 8 months ago by tblakely.
Thanks. I updated the last function, but still having the same problem — the keyword search is not displaying the classified listings. Can you take a look https://bit.ly/2sh4UQd
- This reply was modified 7 years, 8 months ago by tblakely.
Thanks. I added the above code and I get the error “Warning: Invalid argument supplied for foreach() in /home/[mysite]/public_html/wp-content/plugins/wpadverts-mal/includes/mode-autocomplete.php on line 345”
You can see the error here: https://bit.ly/2sh4UQd
- This reply was modified 7 years, 8 months ago by tblakely.
Hello, here’s a link to my [adverts_list] page: https://bit.ly/2sh4UQd