Worried I have a funky .htaccess for WP site in light of strange search engine behavior

WordPress responds to requests to a robots.txt with dynamic content if such a file does not exist. That’s one way how the settings from wp-admin/options-privacy.php are used. I recommend to create a static robots.txt, just to make sure no plugin is getting in your way. Sample robots.txt User-agent: * Disallow: /cgi-bin Disallow: /wp-admin Disallow: /wp-includes … Read more

Plugin: Events Manager – Search by start date only

I solved this. First add $args[‘scope’] = $_REQUEST[‘scope’][0]; to the events-list.php under the line: em_locate_template(‘templates/events-search.php’,true); This will stop the search from finding a date range and only search single dates. Then in events-search.php, remove the second box for end-date. then in events manager plugin folder “classes” file em-events.php This is what it should look like … Read more

Add search box to page

You can do this using the get_search_form() function. For your custom parameters you can add some hidden fields or you can modify the action attribute value. The following can be considered as your form layout. <form role=”search” method=”get” id=”searchform” action=”<?php echo home_url( “https://wordpress.stackexchange.com/” ); ?>”> <div><label class=”screen-reader-text” for=”s”>Search for:</label> <input type=”text” value=”” name=”s” id=”s” /> … Read more

Force is_search to always TRUE

You can force WordPress to load search.php template when you need it by using the following code: add_filter( ‘template_include’, ‘get_search_template’ ); instead of $q->set( ‘is_search’, true );

Why won’t is_search work inside functions.php?

… the call works fine as it actually echos “nope” where it’s supposed to, are you saying that it may be a problem because I’m making an ajax call which is not search.php? An Ajax call is a new request to the server. The page that loads is (should be) wp-admin/admin-ajax.php which is template neutral. … Read more

Search Result from another wordpress website

Yes this will be possible. I would suggest integrating your WordPress websites search with Google search and then you can specify the site/s (in your cause Site B) you wish to search when a users performs a search on your current site (Site A) Here is a awesome and simple tutorial a-z tutorial on how … Read more

Use search in fancybox

The easiest way: create a page template that only includes the search form (get_search_form()) create a page and assing the template In the href attrib of the iframe, instead of put the url for searchform.php put the url of the page Pretty easy, but you need a query to get the page. A more performant … Read more

Custom Search Query running on every page

You are missing the curly brackets {} around your query statements so the query is modified regardless of the if statement. So try modifying your code to have something like if( is_search() ) { $fields=”…”; return $fields } same thing with your $join variable Remember that while using if without brackets is acceptable for single … Read more