• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » Filter Hooks » wpmem_login_failed_args

wpmem_login_failed_args

Description

This hook allows you to override the defaults for the main body login error message.

$defaults = array(
	'div_before'     => '<div align="center" id="wpmem_msg">',
	'div_after'      => '</div>', 
	'heading_before' => '<h2>',
	'heading'        => __( 'Login Failed!', 'wp-members' ),
	'heading_after'  => '</h2>',
	'p_before'       => '<p>',
	'message'        => __( 'You entered an invalid username or password.', 'wp-members' ),
	'p_after'        => '</p>',
	'link'           => '<a href="' . $_SERVER['REQUEST_URI'] . '">' . __( 'Click here to continue.', 'wp-members' ) . '</a>'
);

Parameters

None

Return

$args
(array) (required) An array of arguments that are to override form $defaults.

Changelog

Introduced in version 2.9.0

Source

wpmem_login_failed_args is located in wp-members-dialogs.php

Usage

add_filter( 'wpmem_login_failed_args', 'my_login_failed_args' );

function my_login_failed_args() {
	/**
	 * This example changes the login error message, removing the
	 * heading tags and text, changing the message. Note the 
	 * tags that are not being changed need not be included.
	 */
	$args = array( 
		'heading_before' => '',
		'heading'        => '',
		'heading_after'  => '',
		'message'        => 'You did something wrong.',
	);

	return $args;
}
See a list of all filter and action hooks

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy