Skip to content

Instantly share code, notes, and snippets.

View JamesVanWaza's full-sized avatar

JamesVanWaza

  • Washington DC, Rockville MD
View GitHub Profile
@JamesVanWaza
JamesVanWaza / functions.php
Last active May 8, 2023 19:51
Wordpress: Login Page Change
<?php
function my_login_logo() { ?>
<style>
#login h1 a, .login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png);
height:65px;
width:320px;
background-size: 320px 65px;
background-repeat: no-repeat;
padding-bottom: 30px;
@JamesVanWaza
JamesVanWaza / functions.php
Last active November 14, 2021 23:27
Wordpress: Last Updated On
<?php
function display_last_updated_date( $content ) {
$original_time = get_the_time('U');
$modified_time = get_the_modified_time('U');
if ($modified_time >= $original_time + 86400) {
$updated_time = get_the_modified_time('h:i a');
$updated_day = get_the_modified_time('F jS, Y');
$modified_content .= '<p class="last-modified">This page was last updated on '. $updated_day . ' at '. $updated_time .'</p>';
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/algolia-min.css">
<title>Algolia Quickstart Demo</title>
</head>
<body>
@JamesVanWaza
JamesVanWaza / wp-copyright.php
Created January 16, 2017 14:18
Update Wordpress Copyright Date Automatically
@JamesVanWaza
JamesVanWaza / index.php
Created August 9, 2016 01:14
Add a Favicon to Wordpress
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
/** When a directory is included */
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/images/favicon.ico" />
@JamesVanWaza
JamesVanWaza / index.html
Created August 5, 2016 23:05
Packtpub Error Testing
<form id="webForm" method="POST">
<div class="header">
<h3>Register</h3>
</div>
<div class="input-frame">
<label for="firstName">First Name:</label>
<input name="firstName" id="firstName" type="text" class="required" />
</div>
<div class="input-frame">
<label for="lastName">Last Name:</label>
@JamesVanWaza
JamesVanWaza / favicon.php
Created July 30, 2016 16:14
Installing a Favicon with Wordpress
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
@JamesVanWaza
JamesVanWaza / bootstrapgruntfilejul232016.js
Created July 23, 2016 20:07
Bootstrap Gruntfile and SCSS File
/*jslint node: true */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
php: {
dist: {
options: {
port: '?'
}
/*jslint node: true */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
loadPath: ['bower_components/foundation-sites/scss'],
outputStyle: 'expanded',
@JamesVanWaza
JamesVanWaza / bootstrapgruntfile.js
Created April 3, 2016 17:51
bootstrapgruntfile.js
/*jslint node: true */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
/** Only use include_paths if extracting elements from Bower */
includePaths: ['bower_components/bootstrap-sass/assets/stylesheets'],