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 / 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 / wp-copyright.php
Created January 16, 2017 14:18
Update Wordpress Copyright Date Automatically
<!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 / 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>';
}
@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;