Here are five examples that add (or change/remove) custom text above the login/register forms.
- The first example changes and/or removes the text above the login/register forms ONLY on the “Open a Ticket” page.
- The second example adds text above the login/register forms ONLY on the “My Tickets” page.
- The third example adds text above the forms on both pages (“Open a Ticket” page and “My Tickets” page).
- The fourth example adds text only above the login form fields, on both pages.
- The fifth example adds text only above the registration form fields, on both pages.
-
Example 1
Change or remove text above the login/register forms on the “Open a Ticket” page:On the “Open a Ticket”, if a user is not logged in, the default text above the login/register form is, “Please log in to open a support ticket.” You can change that text with the following filter. Replace “Please log in or register.” on line 7 with your own custom text.
/** * Change the text above the login form only on the ticket submission page. */ function my_eddstix_submit_ticket_intro( $default ) { return 'Please log in or register.'; } add_filter( 'eddstix_submit_ticket_login_intro', 'my_eddstix_submit_ticket_intro' );
Or, you can remove the text altogether with this:
/** * Remove the text above the login form on the ticket submission page. */ add_action( 'init', 'my_remove_eddstix_before_submit_login_register'); function my_remove_eddstix_before_submit_login_register() { remove_action( 'eddstix_before_submit_login_register', 'eddstix_login_register_intro' ); }
-
Example 2
Add text above login/register forms only on “My Tickets” Page. Replace “Please log in or register to access support” on line 7 with your own custom text:/** * Add custom text above the registration and login forms ONLY on the My Tickets page. */ function my_eddstix_before_tickets_login_register() { echo '<p>Please log in or register to access support.</p>'; } add_action( 'eddstix_before_my_tickets_login_register', 'my_eddstix_before_tickets_login_register' );
- Example 3
Add text above the login/register forms on both pages:/** * Add custom text above the registration and login forms */ function my_eddstix_before_login_register() { echo '<p>Support is only provided to My Site users. Please login below or sign up for a free account.</p>'; } add_action( 'eddstix_before_login_register', 'my_eddstix_before_login_register' );
- Example 4
Add custom text above the login form fields, on both pages:/** * Add custom text above the login form fields */ function my_eddstix_before_login_fields() { echo '<p>Support is only provided to My Site users. Please log in. </p>'; } add_action( 'eddstix_before_login_fields', 'my_eddstix_before_login_fields' );
- Example 5
Add custom text above the registration form fields, on both pages:/** * Add custom text above the registration form fields */ function my_eddstix_before_registration_fields() { echo '<p>Support is only provided to My Site users. Please sign up for a free account.</p>'; } add_action( 'eddstix_before_registration_fields', 'my_eddstix_before_registration_fields' );
Questions and Comments are Welcome