Skip to content

Instantly share code, notes, and snippets.

View taotiwordpress's full-sized avatar

taotiwordpress

View GitHub Profile
@taotiwordpress
taotiwordpress / ISSUE_TEMPLATES.md
Last active October 4, 2021 13:45
Task Creation Templates #templates #tasking #teams #markdown #bugs #tasks #enhancements #epics

Issue Templates

  • version: 1.0.0-alpha

Depending on the scenario, there are a number of 'templates' that could make work a little easier if previously templated.

Creating tasks, creating large feature requests, commenting on changes to insurance updates, and so on.

The linked / associated gists provide an initial draft of example templates, which can hopefully be built upon.

@taotiwordpress
taotiwordpress / twig-bag-of-tools.md
Last active February 18, 2025 21:47
Twig Cheatsheet #twig #timber #wordpress #cheatsheet #images #wp-query #wp_query #the_loop

Timber Bag of Tools Cheat Sheet

Useful Variables

Remember, there are 'TWIG' tools and then there are 'Timber' tools.

The second is WordPress specific.

Twig-based Variables

@taotiwordpress
taotiwordpress / timber-twig-example-cpt-archive.md
Last active March 4, 2022 21:43
Timber & TWIG - Example CPT Archive #timber #archive #cpt #cheatsheet

Timber & TWIG - Example CPT Archive

This is a comparison of a default 'WordPress' template and the same template re-written to instead use Timber/TWIG to separate the coding from the theming.

Example Code:

The WordPress-Default Query

This is for a custom-post type named 'Books' and the template-file is correctly named archive-books.php.

@taotiwordpress
taotiwordpress / debugging-cheatsheet.md
Created March 4, 2022 23:30
Debugging Cheatsheet #cheatsheet #debugging

Debugging

Options to Enable Debugging

These changes need to be made in your active wp-config.php file in order to be used (or dumped in a wp-config-local.php file).

<?php

/* PHP errors, notices and warnings will be displayed */
@taotiwordpress
taotiwordpress / banner_alert.js
Created July 8, 2022 16:14
Alert / Announcement Banner #alert #announcement #javascript #localStorage
(function ($) {
"use strict";
/**
* LocalStorage based Alert Bar
*
* This 'Alert Bar' will track (localStorage) whether user has
* manually clicked 'close' on a CURRENT banner.
*
<?php
/**
* Customize Yoast SEO Breadcrumbs
*
* 1. Remove the 'Home' Link from Yoast SEO Breadcrumbs
* This 'starts' Breadcrumbs at the 2nd level.
* 2. Remove the 'current page' from the link for 'Example'.
*
* @param array $links of Yoast SEO breadcrumb links.