items_wrap not working

your problem is in your use ‘menu_class’ and ‘items_wrap’ not synchronized. You can edit : wp_nav_menu( array( ‘theme_location’ => ‘header-menu’, ‘container’ => ”, ‘echo’ => ‘0’, ‘menu_class’ => ‘nav-menu horiz-menu container sixteen columns’, ‘items_wrap’ => ‘<ul class=”%2$s”>%3$s</ul>’ ) ) or: wp_nav_menu( array( ‘theme_location’ => ‘header-menu’, ‘container’ => ”, ‘echo’ => ‘0’, ‘items_wrap’ => ‘<ul class=”nav-menu … Read more

Display page only if user registered before a specific date

This is a basic function to get the current user and compare it with a custom DateTime to see if the user registered earlier or later: function wpse_219284_registered_before( $date_time ) { $user = wp_get_current_user(); $registered_before = false; if ( $user instanceof WP_User ) { $registered = new DateTime( $user->data->user_registered ); $limit = new DateTime( $date_time … Read more

How to send user data in json format to another server when user register on wordpress site in PHP

Sending and receiving data in JSON format using POST method xhr = new XMLHttpRequest(); var url = “url”; xhr.open(“POST”, url, true); xhr.setRequestHeader(“Content-type”, “application/json”); xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { var json = JSON.parse(xhr.responseText); console.log(json.email + “, ” + json.password) } } var data = JSON.stringify({“email”:”[email protected]”,”password”:”101010″}); xhr.send(data); Sending … Read more

Get the password key when using the wp_new_user_notification_email filter

I found a function to retrieve this key : get_password_reset_key(). So now I have this code in my plugin to customize the email sent to newly registered users: add_filter(‘wp_new_user_notification_email’, ‘change_notification_message’, 10, 3); function change_notification_message( $wp_new_user_notification_email, $user, $blogname ) { // Generate a new key $key = get_password_reset_key( $user ); // Set the subject $wp_new_user_notification_email[‘subject’] = … Read more

Protect custom php file with login

This is impossible to answer definitively without a better description, but I am assuming that app.php is a completely distinct piece of code. In which case, WordPress can’t really manage access to it. You will need to incorporate it into WordPress. While this is not the only way to do it I would advise: Create … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)