I have created a dummy page and inserted the plugin shortcode in it. When search for a keyword, the search results shows the results from other pages. How can I limit the search results to only the page where the shortcode is. I would like to have something similar to this for other pages. That is, the search result is limited to their own page.
Do you mean returning parts of the content of the current page? Unfortunately that is not possible to achieve with a plugin. It can only return separate pages as results, but not parts of post type objects, as those are not stored separately in the database.
If the contents on the current page are perhaps other pages/posts, and they are somehow categorized, then it might be possible with a small custom code snippet.Best,
You must be logged in to reply to this topic.