CSS Tables are cool. Use CSS Tables for layouts when you need easy vertical alignment, CSS based fixed footers with dynamic heights, and stack ordering.
A Pen by Ahmad Awais on CodePen.
/** | |
* @Check if it is a particular WordPress page | |
* @Codex http://codex.wordpress.org/Function_Reference/is_page | |
* | |
*/ | |
if(is_page(42)){ | |
//This runs when page with ID 42 is being displayed | |
} | |
else{ |
<?php | |
/** | |
* Template Name: Login Page AA | |
* | |
* Login Page Template. | |
* | |
* @author Ahmad Awais | |
* @since 1.0.0 | |
*/ |
<?php | |
/* | |
* Normally | |
* $content=get_post_meta($post->ID, 'SMTH_METANAME_VALUE', true); | |
* echo $content | |
**/ | |
echo html_entity_decode($content); |
// Custom Dashboard widgets | |
function custom_dashboard_widgets() { | |
global $wp_meta_boxes; | |
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] ); | |
unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); |
/** Login Redirect | |
* Redirect user after successful login. | |
* | |
* @param string $redirect_to URL to redirect to. | |
* @param string $request URL the user is coming from. | |
* @param object $user Logged user's data. | |
* @return string | |
*/ | |
function my_login_redirect( $redirect_to, $request, $user ) { | |
//is there a user to check? |
/*Login Error Handle*/ | |
add_action( 'wp_login_failed', 'aa_login_failed' ); // hook failed login | |
function aa_login_failed( $user ) { | |
// check what page the login attempt is coming from | |
$referrer = $_SERVER['HTTP_REFERER']; | |
// check that were not on the default login page | |
if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') && $user!=null ) { | |
// make sure we don't already have a failed login attempt |
CSS Tables are cool. Use CSS Tables for layouts when you need easy vertical alignment, CSS based fixed footers with dynamic heights, and stack ordering.
A Pen by Ahmad Awais on CodePen.
Using particle to build an animated hero unit for an upcoming product.
A Pen by Ahmad Awais on CodePen.
A Pen by Ahmad Awais on CodePen.