Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
<?php | |
/** make sure facet always targets the archive query as the main query | |
** sometimes there is a mysterious extra query that is a duplicate | |
** of the main query | |
**/ | |
add_filter( 'pre_get_posts', function( $query ) { | |
if ( $query->is_archive() && $query->is_main_query() ) { | |
$query->set( 'facetwp', true ); | |
} | |
}, 9 ); |
.block-container > *, /* [1] */ | |
.wp-block-group__inner-container > * { /* [2] */ | |
max-width: 46.25rem; | |
margin-left: 1.25rem; | |
margin-right: 1.25rem; | |
@media (min-width: 48.75em) { /* [3] */ | |
margin-left: auto; | |
margin-right: auto; | |
} |
Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
<?php | |
/** | |
* Plugin Name: Enhanced WP Mail Attachments | |
* Plugin URI: https://gist.github.com/thomasfw/5df1a041fd8f9c939ef9d88d887ce023/ | |
* Version: 0.1 | |
*/ | |
/** | |
* Adds support for defining attachments as data arrays in wp_mail(). |
{ | |
"$schema": "http://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"layout": { | |
"contentSize": "750px" | |
}, | |
"color": { | |
"background": false, | |
"custom": false, |
/** | |
* faux-block-editor.css v1.1 | |
* | |
* Styles to make the Classic Editor screen appear more like the Block Editor | |
* | |
* Expects the class "faux-block-editor" on any screen that should use these styles | |
*/ | |
.faux-block-editor { | |
overflow-x: hidden; |
<?php | |
/** | |
* Get an SVG file from the imgs/ folder in the theme, update its attributes if necessary and return it as a string. | |
* | |
* @author Aurooba Ahmed | |
* @see https://aurooba.com/inline-svgs-in-your-wordpress-code-with-this-helper-function/ | |
* | |
* @param string $filename The name of the SVG file to get. | |
* @param array $attributes (optional) An array of attributes to add/modify to the SVG file. |