S
S
Sergey Shvab2018-10-04 19:10:24
Google Custom Search
Sergey Shvab, 2018-10-04 19:10:24

How to implement category filter for google custom search?

Hello!
I need to implement a custom search from Google on a Wordpress site
One of the tasks is to implement filtering by article categories
Something like this
WMZafGX.png
I know that this is easy to do by adding labels created in the account and attaching them to the appropriate site url template, like this
xSJZyA7.png
But the problem is that the url structure on my site is site.com/article-title and doesn't contain a category slug that I can use to create a url template. Namely, its content in the url is the filtering criterion, as far as I understand.
I'm not familiar with google custom searchand familiarization with the documentation and some APIs did not lead me to the right solution, so I ask for advice from people who may have encountered similar tasks and can tell you how to implement a search filter within the same site by category in this case.
I feel that micromarking or something else should somehow help with this, but I don’t know how to use it for this task.
In general, I ask you to help with solutions, if you have ideas or information about this.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question