Jump to content
chrisdhanaraj

How do I disable search?

Recommended Posts

chrisdhanaraj

I didn't see how I can disable search within the framework. I want to use Google CSE. Thanks!

Share this post


Link to post
Share on other sites
chrisdhanaraj

I did that. I've enclosed a screenshot. The search box remains in the fixed nav at the top which is what I want but the search results are still wordpress.

post-42204-0-86991800-1350314205_thumb.p

Share this post


Link to post
Share on other sites
chrisdhanaraj

How do I now put a new search box in that area since it's now hidden?

Share this post


Link to post
Share on other sites
chrisdhanaraj

How do I add a search bar in the fixed top nav that replaces the one that was provided by the framework? Is this a function or a template?

Share this post


Link to post
Share on other sites
catrina

The search bar would need to be added to the section. With the plugin you've selected, is the search field implemented using code?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Simon

You dont have to edit any sections. You have 2 choices.

1. Use the built in filter 'pagelines_search_form' to change the search box code.

2. Make a new file searchform.php in your child theme and put whatever you like in it.

Share this post


Link to post
Share on other sites
chrisdhanaraj

How would I implement the following code using your example?

<!-- Put the following javascript before the closing </head> tag. -->

<script>

(function() {

var cx = '001061980289920023607:wfqci_qk0mc';

var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;

gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +

'//www.google.com/cse/cse.js?cx=' + cx;

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);

})();

</script>

<!-- Place this tag where you want the search results to render -->

<gcse:searchresults-only></gcse:searchresults-only>

Share this post


Link to post
Share on other sites
James B

Hi there, you can place that code in Pagelines>site options>custom code>header scripts (second box down)


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • mtaus
      By mtaus
      How can I remove the Search function from NavPro?
    • John Olsson
      By John Olsson+
      Hello, i'm working on a webshop, and got this code to really boost the search within WP. But when adding this code to functions.php the front end media library search flipped totally, and not working at all, any ideas what's the problem?
      function atom_search_where($where){ global $wpdb; if (is_search()) $where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')"; return $where; } function atom_search_join($join){ global $wpdb; if (is_search()) $join .= "LEFT JOIN {$wpdb->term_relationships} tr ON {$wpdb->posts}.ID = tr.object_id INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id"; return $join; } function atom_search_groupby($groupby){ global $wpdb; // we need to group on post ID $groupby_id = "{$wpdb->posts}.ID"; if(!is_search() || strpos($groupby, $groupby_id) !== false) return $groupby; // groupby was empty, use ours if(!strlen(trim($groupby))) return $groupby_id; // wasn't empty, append ours return $groupby.", ".$groupby_id; } add_filter('posts_where','atom_search_where'); add_filter('posts_join', 'atom_search_join'); add_filter('posts_groupby', 'atom_search_groupby');  
    • Queue-it
      By Queue-it+
      HI,
      Search function doesn't seem to work. 
      When ever searching for something it redirect to the home page and add the search string to the url.
      For example searching for "cases" it would display https://queue-it.com/?s=cases
      Do you know how to solve that? 
    • MissT
      By MissT+
      Would be great to have the ability to include a search option within menus and within Splashup - is this possible?
    • balfred1345
      By balfred1345
      null When I tested Search using the search field in Navi, it throws the error as shown in pastebin: http://pastebin.com/DJ079bmy
      Is there a fix for this? If there is no fix, can you please tell me how to disable search in Navi?
      Thanks,
      Bruce
×