pimmeelhuysen
Forum Replies Created
-
Actually the answer is pretty simple.
Go to Post Types Order > Settings and uncheck auto sort, that should fix it.
Cheers!
Forum: Plugins
In reply to: [Age Gate] If someone fails the age test, block them for 1 hourI finally got it to work. It took me quiet a long time, but I finally managed.
I did the following:
* When Age Gate is shown and the submit button is clicked, it takes a split second for the cookie “age_gate_failed” to be set.
* Using a time out I delayed getting the value of the cookie. The getCookie function returns the value of the cookie.
* Finally I updated the expiration date of the cookie using the setCookie function.//Get value of named cookie function getCookie(cookieName) { var cookie = {}; document.cookie.split(';').forEach(function(el) { var [key,value] = el.split('='); cookie[key.trim()] = value; }); return cookie[cookieName]; } //Set expiration function setCookie(name, value, minutes) { var date = new Date(); date.setTime(date.getTime() + (minutes*60*1000)); var expires = 'expires='+ date.toUTCString(); document.cookie = name + '=' + value + ';' + expires + ';path=/'; } jQuery(document).ready(function($) { $(window).on('agegateshown', function() { $('.age-gate-submit').on('click', function() { //Set timeout in order for age_gate_failed to be set setTimeout( function() { var fail = getCookie('age_gate_failed'); if (fail == 1) { setCookie('age_gate_failed', 'x', 60); } }, 1000); }); }); });
Thank you for helping me on my way!
- This reply was modified 2 years, 9 months ago by pimmeelhuysen.
Forum: Plugins
In reply to: [Age Gate] If someone fails the age test, block them for 1 hourHi Phil,
Thank you very much, but I cannot seem to get it to work. My JS knowledge is limited.
What event listener is triggered after the user fails the challenge? I’m familiar with “agegatepassed”, but is there an “agegatefailed”? Since the cookie “age_gate_failed” is set after the user fails the challenge, I need something to set the next steps in motion.
After that I can apply your approach:
* Getting the value of “age_gate_failed” (which is 1)
* If equal 1, update the expiration dateHope you can help.
Thank you.
Pim
Forum: Plugins
In reply to: [Age Gate] If someone fails the age test, block them for 1 hourHey Phil,
Thank you for your answer.
When the option “rechallenge” is disabled and a user fails Age Gate, a cookie named “age_gate_failed” is stored. I figure that as long as a user has said cookie, the user will not be able to use Age Gate again.
Is it possible to negate “age_gate_failed” after one hour and let the user retry. Or do I need to take a different approach?
Hope hearing from you.
Pim
Forum: Plugins
In reply to: [Age Gate] Start date with todayPhil,
Really, really awesome, it works!
Thank you!
Pim
Forum: Plugins
In reply to: [Age Gate] If someone fails the age test, block them for 1 hourAnyone? Need help with this.
Forum: Plugins
In reply to: [Age Gate] Start date with todayAnyone? Need help with this.
Forum: Plugins
In reply to: [Site Reviews] Stars visible with no reviewsYOU ARE AWESOME!!!
Your update solved everything.
Thank you again!
Forum: Plugins
In reply to: [Site Reviews] Stars visible with no reviewsThank you so much.
I’ll give that a try.
Great support.
Forum: Plugins
In reply to: [Site Reviews] Stars visible with no reviewsJust to be clear. We are duplicating posts in order to re-use parts of it, not reviews (at least not intentionally).
I thought reviews were assigned to post IDs. Creating new posts and thus new IDs (by duplicating) would mean no reviews should be assigned, hence no summary should be visible.
But on duplicated posts, with no reviews, the summary (stars) is visible.
Questions:
* How to remove the summary (stars) on duplicated posts when no reviews are present?
* How to make sure this doesn’t happen again when duplicating posts?Thank you for your time
Forum: Plugins
In reply to: [Site Reviews] Stars visible with no reviewsYes, for certain posts the summary is showing without having reviews.
Yes, we are using caching plugins, but emptying or deactivating them doesn’t solve the issue.I have noticed (just yet) that it only appears when duplicating posts. When creating new posts the issue does not arise.
Before contacting support, maybe this insight brings a new solution?
Thank you
Forum: Plugins
In reply to: [Site Reviews] Stars visible with no reviewsHi,
Thank you.
I’ve recalculated the counts, but the problem remains.
What other steps can I take?
Pim