Skip to content

Instantly share code, notes, and snippets.

View 465media's full-sized avatar

Nathan Baldwin 465media

View GitHub Profile
[
{
"key": "group_66aa8a860a823",
"title": "Post Fields",
"fields": [
{
"key": "field_67a3c27866291",
"label": "Select Traveler",
"name": "select_traveler",
"aria-label": "",
<?php
/**
* The MedPro Products block template
*/
?>
<section class="medpro-products">
<div class="medpro-products__row">
<?php if ( ! is_wp_error( get_term_link( 'sports-medicine', 'ani_product_category' ) ) ) : ?>
<div id="medpro-products-sports-medicine" class="medpro-products__column">
<a href="<?php echo get_term_link( 'sports-medicine', 'ani_product_category' ); ?>" class="medpro-products__column-image-wrap">
# Nu-Makers-Space
## Relevant URLs
[Development Site](https://nudvexpmaker.wpengine.com/): https://nudvexpmaker.wpengine.com/
## Project Assets
- Designs are on [Sketch](https://sketch.com)
- [link to gravity snippet we might need](https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-email-domain-validator.php)
{
"version": 2,
"settings": {
"layout": {
"contentSize": "840px",
"wideSize": "1100px"
},
"color": {
"defaultPalette": false,
"custom": false,
@465media
465media / gist:17664b045de75deafcb2b99695d22df9
Created May 25, 2023 14:55
Set default "From Email" for Gravity Forms notifications using WordPress domain.
/**
* Set default "From Email" for Gravity Forms notifications using WordPress domain.
*/
function override_gravityforms_from_email( $email, $notification ) {
// Get the WordPress site URL and extract the domain.
$site_url = get_site_url();
$parsed_url = parse_url( $site_url );
$domain = isset( $parsed_url['host'] ) ? $parsed_url['host'] : '';
if ( isset( $email['from'] ) && $email['from'] === '{admin_email}' ) {
$email['from'] = 'no-reply@' . $domain;
{
"FirstName": "Test",
"LastName": "Subject",
"SortName": "Subject, Test",
"ConstituentType": {
"ControlGroup": {
"Description": "(Default Control Group)",
"Id": -1,
"Inactive": false
},
add_action( 'load-post.php', '465_post_meta_boxes_setup' );
add_action( 'load-post-new.php', '465_post_meta_boxes_setup' );
function 465_post_meta_boxes_setup() {
add_action( 'add_meta_boxes', '465_add_post_meta_boxes' );
add_action( 'save_post', '465_save_post_class_meta', 10, 2 );
}
function 465_add_post_meta_boxes() {
add_meta_box(
Blog page code :
<?php wpgb_render_grid( array(
'id' => 1,
'is_main_query' => true,
) ) ?>
Guides archive code :
<?php wpgb_render_grid( array(
'id' => 4,
@465media
465media / function.php
Created May 13, 2021 15:33
Barriciad Functions
<?php
/**
* barricaid functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package barricaid
*/
use Barricaid\App;
@465media
465media / functions.php
Created January 26, 2021 14:20
Danforth disable color picker
/**
* Disable the custom color picker.
*/
function danforth_gutenberg_disable_custom_colors() {
add_theme_support( 'disable-custom-colors' );
}
add_action( 'after_setup_theme', 'danforth_gutenberg_disable_custom_colors' );