There’s currently no option to hide the search on certain pages or post but you can add a custom filter in your theme’s functions.php file to achieve this.
First you will need to know what post ids you want to hide the search on.
To check the post/page id you can go to your Posts or Pages screen in admin panel. Click on the post/page to edit it.
In your browser address bar you will see the url that has this part: post=670 (the number is the post id and it’s different for every post/page).
When you collected the post ids you can click Appearance -> Editor. On the right column click on Theme Functions (functions.php) – this should load the file for editing.
If at the very bottom of the file you see this tag: ?> (question mark, greater sign) you will need to add the code above it, otherwise just add the code to the bottom of the file:
add_filter( ‘aucomz11_after_form_html_filter’, ‘aucomz_hide_on_post_ids_filter’, 10, 2 );
function aucomz_hide_on_post_ids_filter($html, $args)
{
global $post;
$post_ids_to_hide = array(1, 2, 3);
if (isset($post->ID) && in_array($post->ID, $post_ids_to_hide))
{
return ”;
}
else
{
return $html;
}
}
And click Save.
Note: replace 1, 2, 3 with comma separated list of post ids.
This should hide all AutoCompleteZon search forms from those posts/pages.
If you have difficulties adding the code just contact me and I’ll help you right away.
Posted in: Common Support Questions