-
IreneFarber
Hi,
I want to replace the WordPress search with Google Programable Search.I’ve found these old threads:
https://generatepress.com/forums/topic/google-site-searchcustom-search-implementation/page/2/#post-1656373
https://generatepress.com/forums/topic/question-about-gp-3-0-and-generate_do_template_part/#post-1429909I wonder if there is something newer in GeneratePress to accomplish this.
I don’t manage coding, I can only paste it in the right place. Sorry, but I need some precision about Elements settings if I have to apply what is explained in those threads.
Add new Element> Which one?
Block Element> Which one?Sorry, maybe is obvious but I find different answers inside the threads.
ThanksIrene
-
Hi there,
You can use the code from the 1st post:
https://generatepress.com/forums/topic/google-site-searchcustom-search-implementation/page/2/#post-1656373And replace the CX parameter value in the code.
To add PHP code, check this article: https://docs.generatepress.com/article/adding-php/
-
IreneFarber
Thanks for your answer
You can use the code from the 1st post:
https://generatepress.com/forums/topic/google-site-searchcustom-search-implementation/page/2/#post-1656373Yes, I understand that.
Please, I need to know the Element settings for including the code.It’s unclear which Element settings are used in the example thread.
Add new Element> Which one?
In the sidebar of the Element window
Block Element> Which one?Thanks
Irene -
Please, I need to know the Element settings for including the code.
No element is required, it’s a PHP code, and I’ve linked you to the doc of how to add PHP code.
-
IreneFarber
Thanks for the answer, and sorry, for the misunderstood
I will try with the code snippets plugin. -
You are welcome 🙂 Hope that works!
-
IreneFarber
Hi,
The code didn’t work for me, maybe there were details that I didn’t interpret.
What did help me to integrate Google Custom Search in my WP, is the following article, with some variation because I have a Multisite.
I leave the link in case anyone finds themselves in the same situation
https://www.gulshankumar.net/generatepress-cse/
Thanks
-
Thanks for sharing!
- You must be logged in to reply to this topic.