Skip to content

Instantly share code, notes, and snippets.

View eSaner's full-sized avatar

Eric Saner eSaner

  • JMU Libraries
  • St. Louis, MO
  • 09:28 (UTC -06:00)
View GitHub Profile
<?php
/**
* WP Search & Replace Image Block Thumbnail URLs
*
* Helpful after regenerating image thumbnails. Designed to run in a custom page template.
* Note: limit get_posts() results if PHP times out.
*
* @author Eric Saner
*/
@eSaner
eSaner / index.html
Created December 19, 2022 19:16
Site Maintenance Email Template
<div class="esaner-head">
<link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet">
</div>
<div class="esaner" style="background-color:#ececec;padding:2rem;">
<div class="content" style="width:85%;max-width:700px;margin:0 auto;">
<section class="brand" style="background-color:#ececec;padding:0;border:none;margin-bottom:2rem;">
<img class="logo" style="width:100%;max-width:500px;margin:0 auto;display:block;" src="http://esaner.com/content/uploads/2015/03/esaner-logo.png" />
<h3 class="client" style="text-align:center;">Client Site: bic-history.org</h3>
</section>
<section class="notes" style="background-color:#fff7ca;padding:2rem;border:1px solid #b29f3c;border-radius:0 0 0.75rem 0.75rem;margin-bottom:2rem;">
@eSaner
eSaner / index.html
Created December 8, 2022 22:07
lib.jmu.edu header
<header>
<div id="nav2022" class="contain-to-grid">
<a href="#main" class="skip-link">Skip To Main Content</a>
<nav class="top-bar" data-topbar="" role="navigation">
<div class="title-area name">
<a href="https://www.lib.jmu.edu/">
<img src="https://esaner1.nyc3.cdn.digitaloceanspaces.com/jmu/logo_horizontal-white_lg.svg" alt="JMU Libraries logo, go to homepage">
</a>
<button class="toggle-topbar menu-icon">Menu</button>
</div>
@eSaner
eSaner / anchors-links-fixed-header.scss
Last active February 3, 2018 14:06
Anchor links under fixed header
@eSaner
eSaner / wp-cli_update_multi_posts.txt
Last active April 2, 2023 20:11
Update multiple posts with WP-CLI
/**
* Command line
*
* @source https://git.pub/snippets/4
*/
for id in $(wp post list --post_type=my_post_type --fields=ID --format=ids); do wp post update $id --post_title="Page Number $id"; done