@dlishdesign
I’m not sure if this would be possible or not, but if it is, it would require some custom code.
I will have our Lead Dev @danieliser take a look as soon as he is available and give his thoughts.
Thanks for your patience.
@dlishdesign – Cool idea, would be simple to do by tapping into the analytics hooks and keeping a count in wp_options or post meta. Once it hits your limit then set the post status to draft would suffice.
Can’t say it would get added to the core, but could easily be worked out with a hooked function.
How can we make the max views specific to the user? Don’t want it to go into draft mode because then it would disable viewing it for others. Want to set the max views for individual users. Could we use the analytics piece to track a specific user then when they reach the max view count, a cookie is set for 10 years just for that user?
@dlishdesign – Sorry for the delay. Ok so the only way this would work is to use custom JS at the current time.
Essentially your JS would need to do the following:
– Check for and set a counter cookie. Increase it once each time the popup is shown.
– Then use one of several prevention methods we have in JS to prevent the popup from triggering again.
In fact v1.4.19 & v1.4.20 will help greatly with that. v1.4.19 added JS based conditions functionality, v1.4.20 added some Action/Filter functions in JS that we are using in a few places that you could take advantage of.
Once the counter > limit you can add another cookie like pum-13-never-again and then have your popup triggers look for that cookie. This will permanantly disable it if you set a long cookie time like 10 years.
Hope that helps. Glad to help with the JS.
Closing this ticket due to inactivity. If you’re still having an issue, create a new thread, link this one, and we will continue troubleshooting.
Please take a moment to rate and review the plugin and or support.