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 | |
/** | |
* 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 | |
*/ |
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
<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;"> |
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
<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> |
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
/** | |
* Pure css solution inspired by Alexander Savin: | |
* @see https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header/24298427#24298427 | |
*/ | |
a[name] { | |
padding-top: 40px; | |
margin-top: -40px; | |
display: inline-block; /* required for webkit browsers */ | |
} |
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
/** | |
* 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 |