Changing search terms results a 403 – dsIDXpress Pro plugin [closed]
Solved. It turned out that the Block Bad Queries (BBQ) plugin that I use simply blocked too much. Marco
Solved. It turned out that the Block Bad Queries (BBQ) plugin that I use simply blocked too much. Marco
To clarify, it is important to note that the HTML presented above is not necessarily directly related to the search query you’re making. I would advise disabling any plugins that potentially modify the search query. If that doesn’t remedy the issue, there may be a query filter within your currently active theme or a plugin … Read more
Some themes like Twenty Fourteen include a template tag included in the content.php file for entry meta which includes the author and date: Example: twentyfourteen_posted_on(); The content.php file also includes the_title() tag so you need to remove that if you don’t want the entry titles displaying on your search result pages. The search.php file includes … Read more
Solved changing the location block with this: location / { try_files $uri $uri/ /index.php?$args; }
You will want to register custom post types for each of the sections (books, articles, etc). Your post types should be registered as a custom plugin so that they can be kept in the case you decide to switch your theme. Custom post types: http://codex.wordpress.org/Post_Types WordPress plugin API: http://codex.wordpress.org/Plugin_API The advanced search is a bit … Read more
Your issue is with the modification to the site search. You need to restrict your filter more. To prevent it executing on the backend add a negated is_admin() condition. add_filter( ‘pre_get_posts’, ‘tgm_cpt_search’ ); function tgm_cpt_search( $query ) { if ( !is_admin() && $query->is_search ) $query->set( ‘post_type’, array( ‘page’) ); return $query; }; That filter is … Read more
If you look at the $wpdb->posts table in the database, you will notice that the file names, minus the file type ending, are used for the post_title for attachments. This means that you can effectively search the file name if you can get your search function to search attachments, which the default search (almost) already … Read more
It is better to modify WordPress search SQL query instead of adding extra meta query. try this: function search_distinct($distinct) { $distinct=”DISTINCT”; return $distinct; } function join_table($join){ global $wpdb; $join .= “LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) “; return $join; } function search_into_post_meta( $search, $wp_query ) { if ( is_search() ) { global $wpdb; if … Read more
You can use the pattern attribute to ask for at least 3 characters: <input pattern=”.{3,}”> But if your database dies just because someone searches for a three letter word … you have other problems than search. Optimize your database instead, or find another solution. A simple search, even dozens per minute should not be a … Read more
get_post() returns the post object to the loop. So when you look for its ->ID if no object is there you try to make php to look for ID of nothing, and it gives you the notice. Change post->ID for if( ! get_post() )