View index.php
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 | |
get_header(); | |
if (have_posts()) : | |
while (have_posts()) : | |
the_post(); ?> | |
<h1><?php the_title() ;?></h1> | |
<?php | |
the_post_thumbnail( 'featured-large' ); | |
the_content(); |
View functions.php
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 | |
// First we'll add support for featured images | |
add_theme_support( 'post-thumbnails' ); | |
// Then we'll add our 2 custom images | |
add_image_size( 'featured-large', 1600, 400, true ); | |
add_image_size( 'blog-width', 800, 600 ); | |
// And then we'll add the custom size that spans the width of the blog to the Gutenberg image dropdown | |
add_filter( 'image_size_names_choose', 'wpmudev_custom_image_sizes' ); |
View functions.php
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 | |
add_filter( 'image_size_names_choose','wpmudev_custom_image_sizes' ); | |
function wpmudev_custom_image_sizes( $sizes ) { | |
return array_merge( $sizes, array( | |
//Add your custom sizes here | |
'custom-image-square' => __( 'Square' ), | |
'blog-width' => __( 'Blog Content Full Width' ), |
View retina-wordpress.html
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
<picture> | |
<source | |
media="(min-width: 900px)" | |
srcset="large-image_1x.jpeg 1x, large-image_retina.jpeg 2x" | |
type="image/jpeg > | |
<source | |
media="(min-width: 601px)" | |
srcset="medium-image_1x.webp 1x, medium-image_retina.jpeg 2x" | |
type="image/jpeg" > | |
<source |
View functions.php
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 | |
//remove <?php when you paste inside your functions.php file | |
function admin_login_redirect( $redirect_to, $request, $user ) { | |
global $user; | |
if( isset( $user->roles ) && is_array( $user->roles ) ) { | |
if( in_array( "administrator", $user->roles ) ) { | |
return $redirect_to; | |
} |
View functions.php
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 | |
//remove <?php when you paste into your functions.php file | |
function login_error_override() | |
{ | |
return 'Incorrect login details.'; | |
} | |
add_filter('login_errors', 'login_error_override'); |
View style-login.css
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 div#login h1 a { | |
background-image: url('login-logo.png'); | |
} |
View style-login.css
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 div#login p#nav { | |
display: none; | |
} |
View style-login.css
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 div#login form#loginform p.submit input#wp-submit { | |
background-color:#17a8e3 !important; | |
color: #ffffff; | |
border: 1px solid #0d9ed9; | |
margin: 10px 10px 10px 10px; | |
} |
View login-style.css
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 div#login form#loginform input { | |
font-size: 15px; | |
color: #555555; | |
} |
NewerOlder