This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Twitter, Facebook and Google+ field to contact methods, remove AIM, YIM and Jabber | |
add_filter( 'user_contactmethods', 'ts_add_contact_fields' ); | |
function ts_add_contact_fields( $contactmethods ) { | |
$contactmethods['linkedin'] = 'LinkedIn'; | |
$contactmethods['twitter'] = 'Twitter'; | |
$contactmethods['facebook'] = 'Facebook'; | |
$contactmethods['googleplus'] = 'Google+'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ---------------------------------------------------------------------------------------- | |
// Redirect all non-logged-in users to the login page (private site). Add to functions.php. | |
// ---------------------------------------------------------------------------------------- | |
function admin_redirect() { | |
if ( !is_user_logged_in()) { | |
wp_redirect( home_url('/wp-admin/') ); | |
exit; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------ | |
// custom login style for theme for site url/wp-login.php | |
// ------------------------------------------------------ | |
function childtheme_custom_login() { | |
echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('stylesheet_directory') . '/customlogin.css" />'; | |
} | |
add_action('login_head', 'childtheme_custom_login'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------- | |
// Add Post On New User Registration and Assign to User Registration | |
// ----------------------------------------------------------------- | |
add_action( 'user_register', 'gamma_new_user_post' ); | |
/** | |
* Add a new post when user registers. | |
*/ | |
function gamma_new_user_post( $user_id ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?> class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title><?php wp_title(); ?></title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Bear Necessities | |
Theme URI: http://teolopez.com/themes | |
Description: Bear Necessities Starter Theme | |
Author: Teo Lopez | |
Author URI: http://teolopez.com/ | |
Version: 1.0 | |
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu (optional) | |
License: GNU General Public License v2 or later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The Query | |
$args = array( | |
'post_type' => 'my_custom_post_type', | |
'order' => 'DESC', // DESC or ASC | |
'posts_per_page' => -1, | |
// Call custom taxonomy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body.login { background-color: black;} | |
body.login div#login {} | |
body.login div#login h1 {margin-bottom: 20px;} | |
/* ------ UPDATE LOGO IMAGE - NOTE: must declare background size of image ------ */ | |
body.login div#login h1 a {background-position: top center; background-repeat: no-repeat;background-image: url(img/logo.png);height: 109px; background-size: 209px 109px; height: 80px;} | |
body.login div#login form#loginform { background-color: black; border: none; box-shadow: none;} | |
body.login div#login form#loginform p {} | |
body.login div#login form#loginform p label { color: white;} | |
body.login div#login form#loginform input {} | |
body.login div#login form#loginform input#user_login {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ---------------------------------------------------------------------------------------- | |
// Redirect all non-logged-in users to the login page (private site). Add to functions.php. | |
// ---------------------------------------------------------------------------------------- | |
function admin_redirect() { | |
if ( !is_user_logged_in()) { | |
wp_redirect( home_url('/wp-login.php/') ); | |
exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'login_errors', 'rs_custom_login_error' ); | |
/* | |
* @desc Filter Wordpress admin error message | |
*/ | |
function rs_custom_login_error(){ | |
return $error = "Oops!, sorry you have inputted wrong credentials."; | |
} |
OlderNewer