Creating custom registration and login link in wordpress

Got the answer <?php $c_user = wp_get_current_user(); if( !is_user_logged_in( $c_user->ID ) ) : echo ‘<a href=”‘ . esc_url( site_url(“my-account”) ) . ‘” alt=”‘ . esc_attr( ‘register’, ‘textdomain’ ) . ‘”>’; echo _e( ‘register’, ‘textdomain’ ); echo ‘</a>’; echo ‘<a href=”‘ . esc_url( site_url(“my-account”) ) . ‘” alt=”‘ . esc_attr( ‘Login’, ‘textdomain’ ) . ‘”>’; echo … Read more

new WP_Query(), have_posts() return false in user_register hook

I resolved this by adding ‘post_status’ => ‘draft’ to the $args array, as below $args = array( ‘meta_query’ => array( array( ‘key’ => ‘sending_time’, ‘value’ => ‘on_registration’, ‘compare’ => ‘=’, ) ), ‘post_type’ => ‘_jq_notifications’, ‘posts_per_page’ => -1, ‘post_status’ => ‘draft’ ); The custom post type “_jq_notifications” default status was draft. The documentation here says … Read more