Abhisake Jain
Forum Replies Created
-
Hi,
Thank you for reaching out!
Depending on your site’s custom login page setup and SMTP mailer configuration, linking directly to WordPress’s native password reset handler ensures guaranteed email delivery across all mail configurations.
You can easily enable this compatibility by adding the following snippet to your theme’s
functions.phpfile (or via the Code Snippets plugin):add_action( 'init', function() {
if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
$action = $_POST['rcp_action'] ?? $_POST['rc_action'] ?? '';
if ( 'lostpassword' === $action ) {
// Map legacy fields for compatibility
$_POST['rcp_action'] = 'lostpassword';
$_POST['rcp_lostpassword_nonce'] = $_POST['rcp_lostpassword_nonce'] ?? $_POST['rc_lostpassword_nonce'] ?? '';
$_POST['rcp_user_login'] = $_POST['rcp_user_login'] ?? $_POST['rc_user_login'] ?? '';
// Trigger standard WP password reset email delivery as fallback
$user_login = sanitize_text_field( $_POST['rcp_user_login'] );
if ( ! empty( $user_login ) && function_exists( 'retrieve_password' ) ) {
retrieve_password( $user_login );
}
}
}
}, 5 );Best regards
Hi,
Thank you for reaching out!
This notice can occur when dynamic page builders or custom query loops execute
the_contentfilters before the global post object is initialized in PHP 8.2+.As a quick solution, you can add this small helper snippet to your theme’s
functions.phpfile (or via the Code Snippets plugin). It ensures filters run only when full post context is available:add_filter( 'the_content', function( $content ) {
global $post;
if ( empty( $post ) || ! is_a( $post, 'WP_Post' ) ) {
remove_filter( 'the_content', 'rcMetaDisplayNone' );
remove_filter( 'the_content', 'rcMetaDisplaySubscriber' );
remove_filter( 'the_content', 'rcMetaDisplayContributor' );
remove_filter( 'the_content', 'rcMetaDisplayAuthor' );
remove_filter( 'the_content', 'rcMetaDisplayEditor' );
}
return $content;
}, 1 );Best Regards
- This reply was modified 2 days, 18 hours ago by Abhisake Jain.