• [ Moderator note: moved to Fixing WordPress. Please do not use Developing With WordPress for these topics. ]

    Hi,

    I know WordPress search is using google custom search with the help of init hook. What I like about it is that before search results page loads one cannot tell it’s google custom search

    I want to use the same functionality for my website.

    Thank you WordPress for being so kind also so confusing at times ??

    Thanks,

    Saurabh

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I know WordPress search is using google custom search with the help of init hook.

    Please explain what you mean. Self host sites do not use Google Custom Search unless enabled by a plugin or theme.

    If you want to use GCS on your site, see https://www.google.com/search?q=wordpress+google+custom+search+plugin

    Thread Starter Saurabh Saneja

    (@saurabhsaneja)

    Hi,

    Thanks for writing back. Love ya WordPress support:)

    My question is how come www.remarpro.com’s search form doesn’t look like default Google Custom Search form whereas if I use Google Custom Search either by installing a plugin or replacing searchform.php code with Google Custom Search code, my search form looks like default Google Custom Search Form.

    I don’t mind Google’s branding on search results page(I am using free version of Google Custom Search).

    I really like WordPress’s way of doing it.

    Screenshot of searchform of my website after using a plugin for Google Custom Search or directing adding code to searchform.php file:

    https://pasteboard.co/GBkGkgSp.png

    WordPress Search Form screenshot below:

    https://pasteboard.co/GBkxRMs.png

    WordPres search results page screenshot below: Chrome inspector shows it’s using Google Custom Search

    https://pasteboard.co/GBkybft.png

    Thanks,

    Saurabh

    Off the topic: If I don’t understand a piece of code in WordPress core files even after looking into codex and/or developer.www.remarpro.com, stackoverflow etc, where could I ask for help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How is WordPress using Google custom search with init hook’ is closed to new replies.