tdoccc
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Make empty search query show all resultsAttempted to do some filters of my own – seems to work like it should – selecting a category will search for all films in a category, completely empty search shows up to 500 latest films etc.
If there’s any visible mistakes let us know but I think it should be ok! Thanks anyway – you probably would have helped us out if you had read this in time!
add_filter('relevanssi_search_ok', 'search_trigger'); function search_trigger($search_ok) { global $wp_query; if(!empty($_GET['type'])) { $search_ok = true; } return $search_ok; } add_filter('relevanssi_hits_filter', 'rlv_hits_filter'); function rlv_hits_filter($hits) { global $wp_query; if(!empty($_GET['type'])) $type = $_GET['type']; if ($hits[0] == null) { $args = array( // no search hits, so must create new 'post_type' => 'film', 'tax_query' => array( array( 'taxonomy' => 'type', 'field' => 'slug', 'terms' => array($type) ) ) ); $hits[0] = get_posts($args); } if(empty($_GET['type']) && empty($_GET['s'])) { $args = array( // no search hits, so must create new 'post_type' => 'film', 'posts_per_page' => 500 ); $hits[0] = get_posts($args); } return $hits; }Forum: Plugins
In reply to: [Relevanssi - A Better Search] Make empty search query show all resultsShould probably explain clearer – I’d like it so that when there’s an empty search it searches for all posts like default search… This way I can have it show results if the user for example only selects a category from the dropdown but the searchbar is empty.
Forum: Plugins
In reply to: [Contact Form 7] In next version remove false "configuration errors"Yeah, apologies guys – I can see where you’re both coming from and might have been a bit too hasty.
Forum: Plugins
In reply to: [Contact Form 7] In next version remove false "configuration errors"I wouldn’t mind but the message “misconfiguration blah blah blah” CONSTANTLY pops up on every admin page and there’s no need for it.
That’s fair enough to be honest.
Would it be possible to push us in the right direction in regards to implementing Stopwords in default WP search? Could not find any other info on the web :\
Also I’ve tried the “add quotes to search” function but this doesn’t work and also messes with the title on upload.
If it’s possible to just check if post_title == search query then that’d be great. I want to retain Relevanssi’s use of stopwords (I had trouble implementing these manually)
Just FYI, I have AND as default operator with no OR fallback, Relevance as results order, no fuzzy search, limit searches off, post titles with a weight of 1. I am searching a custom post type only.
Temporary fix.
for function _upload_post()
$author = isset( $_POST['post_author'] ) ? sanitize_text_field( $_POST['post_author'] ) : '';changes to
$current_user = wp_get_current_user(); $author = $current_user->user_login;Works a charm.
This is all I get (from /login/ page)
POST http://*WEBSITE*.co.uk/login/ 500 (Internal Server Error)
Navigated to http://*WEBSITE*.co.uk/login/Limit searches did nothing but adding content to the 4×4 post seemed to do the trick strangely enough :’) It still searches for the title but matches it now! So that’s good!
Tried “2222” and that works ok. “4×4” still nothing. Sadly cannot post site as my client does not want it “public” until it’s 1000% ready… can show when complete 🙁
If there was a simple way of being able to take the redirect code in this plugin and use it as a function in my theme’s functions.php that’d be great… or mabe another plugin.
Forum: Plugins
In reply to: [Theme My Login] SMTP config being skipped?sorry, my bad, this isn’t the plugin.
Forum: Plugins
In reply to: [Frontend Uploader] Link to post after submission?I generate the response notice on the same page as the frontend uploader. What about in handling response notices? I can’t seem to be able to pass the $_POST data to that function (all I require is either post_id or post_title)… I know this would mean editing the plugin but I really want the user to see a hyperlink to their uploaded content.
Forum: Plugins
In reply to: [Frontend Uploader] Link to post after submission?I’m trying to use this
add_action( 'fu_after_upload', 'my_fu_after_upload', 10, 3 ); function my_fu_after_upload( $attachment_ids, $success, $post_id ) { global $clickable_links; $count = count($attachment_ids); for($i=0; $i<=$count; $i++) { $fu_download_links[$i] = wp_get_attachment_url($attachment_ids[$i]); $clickable_links[$i] = '<p><a href="' . $fu_download_links[$i] . '">' . $fu_download_links[$i] . '</a></p>'; echo $clickable_links[$i]; } }I don’t understand though, even echo ‘whatever’ in this shortcode does nothing. I don’t understand how it works? How do I generate the url in the upload response?