Skip to content

Simply Computing

We make websites. Simple.

Add a custom message to the login page

You can add a custom message to appear at the top of the log/registration page with this code snippet.

		/**
 * Add a custom message to the login page
 */

add_action('woocommerce_before_customer_login_form', 'cc_custom_login_message');

function cc_custom_login_message() {

  if (get_option('woocommerce_enable_myaccount_registration') == 'yes') {
  
  ?>
    <div class="woocommerce-info">
      <p><?php _e('Custom message! Returning customers please login.<br />New users register for next time so you can:'); ?></p>
      <ul>
        <li><?php _e('View your order history'); ?></li>
        <li><?php _e('Check on your orders'); ?></li>
        <li><?php _e('Edit your addresses'); ?></li>
        <li><?php _e('Change your password'); ?></li>
      </ul>
    </div>
  <?php
  }
}
	
View Raw Code ID: 9883
  • Home
  • Contact us
  • Payments
  • GeneratePress Hooks
  • WooCommerce Template Hooks
  • WooCommerce Snippets
  • Github Desktop

Simply Computing is administered by Jack and Alan Coggins, and is based in the Blue Mountains area near Sydney, NSW, Australia.

Talk to us

© 2021 Simply Computing