If X Amount of Time Has Passed Since Post Was Published, Do Something

if ( human_time_diff( get_the_time( ‘U’ ), current_time( ‘timestamp’ ) ) < strtotime( ‘7 days’ ) ) { echo ‘New!’; } I’ve also tried: if ( get_the_date( ‘U’ ) > strtotime( ‘-7 days’ ) ) if ( get_the_date( ‘U’ ) < strtotime( ‘-7 days’ ) ) if ( get_the_date( ‘U’ ) > strtotime( ‘7 days’ ) … Read more

AJAX wp_insert_user WORKS but responds with “The site is not enabled”

I have a form on my site which has an AJAX event attached. The AJAX event seems to be working up until I call the wp_insert_user function, I don’t understand why but when I put a wp_send_json_success before the function it works, but straight after, even just returning some text I receieve a “The site is not enabled” response.

Get all commenters on a post

I know there are several similar questions, but I couldn’t find the one I wanted.
I want to get all commenters’s on a post. But if there is a commenter who gives more than one comment, then he is not counted double. I don’t want to display them individually like:

Page get parameter doesn’t work with is_single() function

If exist the page parameter in the blog post, I have to redirect to the 404 page instead of current post URL.
I tried to check the current page type (is singular) and try to get page parameter in the function.php, but I couldn’t. It’s doesn’t work together. I need to implement it only for blog post.
If possible .htaccess redirect also fine