😍Custom Login Page (ok)

https://github.com/srikat/WP-Simple-Custom-Login

143KB
archive
Open

C:\xampp82\htdocs\wp1\wp-content\themes\astra-child\functions.php

<?php
// Start Custom Login Page
add_action('login_enqueue_scripts', 'custom_login_stylesheet');
/**
 * Load style.css on the WordPress login page.
 */
function custom_login_stylesheet()
{
  wp_enqueue_style('custom-login', get_stylesheet_directory_uri() . '/assets/admin/css/style.css');
}
add_filter('login_headerurl', 'my_login_logo_url');
/**
 * Change the URL of the logo in WordPress login page to home URL.
 *
 * @return URL of site's homepage.
 */
function my_login_logo_url()
{
  return home_url();
}
add_filter('login_headertitle', 'my_login_logo_url_title');
/**
 * Filter the title attribute of the header logo above login form.
 *
 * @return string Site title - Site description(tagline).
 */
function my_login_logo_url_title()
{
  return get_bloginfo('name') . ' - ' . get_bloginfo('description');
}
// End Custom Login Page

C:\xampp82\htdocs\wp1\wp-content\themes\astra-child\assets\admin\css\style.scss

Last updated

Was this helpful?