2

I have been hunting the web for days for this feature, and I am kind of surprised it's so hard to find / nobody really talks about it!

I have a Wordpress site with a custom post type that can be pulled by different search attributes. I am looking for a way for users to subscribe to a specific search query string, and once per week, get notified automatically via email when new posts that match their search query string appear.

For example when somebody searches for www.mysite.com/?Location=California&Radius=25, a list of results come up, and if that user subscribes to this search result, then once per week he/she will be notified of new posts matching that search query

I am open to paid plugins as well, it's just I haven't been able to find one that can do this.

I am comfortable with capturing additional information from users when they're signing up, using jQuery and populating hidden fields' values, etc., if this would help with the end goal.

Edit: I thought of an idea of users subscribing to the RSS feed for each search query, since it's automatically generated by adding /feed/ in the search query URL. But I am not sure how to alert users when new posts appear under the RSS feed, and when to fire the alert (i.e. once a week), and how to display all new posts in an email template.

Any help is greatly appreciated!

  • Plugin recommendations are not permitted here. But this is a interesting question. I will vote it up. – gdaniel Jul 29 '14 at 2:10
  • Thank you gdaniel. I don't think plugin recommendation would help as I literally searched for a bunch of queries in Google and went through 10+ pages and could not find anything that can accomplish this function. If anybody has a plugin to recommend can that be emailed to me instead of posting it here? My email address is alvinbond85css at gmail.com (not sure if including my email is allowed, if not I will instantly remove it) – Steph Jul 29 '14 at 2:17
  • I'm searching for this to Steph! Have you had any luck? – Scott Jan 10 '15 at 23:37
  • @Steph did you find a plugin that would achieve this or did you need to code your own? Looking for the exact same thing and it's like nobody thought of it before? – Rocco The Taco May 6 '16 at 1:07
0

The answer is simple, you store the search tems and run the search once a week in the user's context if needed, and notify them about changes.

  • Store the search terms where? Like when the users sign up store the search query in a hidden field, and store that query and run it once a week? I also couldn't find how to check if new results appear in a query If I have to build this from scratch I might just hire a dev as it's over my head... – Steph Jul 29 '14 at 5:28
  • yes, there are many implementation details but they depend on what you actually want to do and what kind of plugins you use to do the search. Since it is user based functionality the best place to store the search terms is in the user meta. As for comparing results, you should keep the date of the last search and search for newer posts. – Mark Kaplun Jul 29 '14 at 6:56
  • Thank you Mark. The only issue with storing user info as part of user meta is that each subscriber must be registered on my website, whereas I'm looking for non-registered users to be able to subscribe to search results as well. I'm guessing I would need to store these info in another part of the database and query it from there. – Steph Jul 29 '14 at 20:21
  • if they subscribe then they are registered users, just because you don't ask them to select a password doesn't prevent you from creating a user for them. – Mark Kaplun Jul 29 '14 at 20:32
  • My site also allows user registration, so these already registered users will run into an error if they ever try to actually register for an acct on the site, since their email address is already used. In any event, how does one go about running the search query each day for each user, then checking for new posts? – Steph Jul 29 '14 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.