Skip to content

Instantly share code, notes, and snippets.

View mjsdiaz's full-sized avatar

Marcy Diaz mjsdiaz

View GitHub Profile
@carasmo
carasmo / dequeue-woocommerce-js-css-on-non-woo-pages.php
Last active February 15, 2024 12:20
Dequeue WooCommerce CSS and JS on non-WooCommerce pages for 3.6.4
<?php
//don't add above twice if it already exists
/**
* Check if WooCommerce Page of all kinds (not just cart and shop)
* @thanks: https://faish.al/2014/01/06/check-if-it-is-woocommerce-page/
* Checked IDS with WooCommerce Repo 1 June 2019
*/
function ca_is_really_woocommerce_page() {
@bradpotter
bradpotter / onboarding.php
Created December 20, 2018 21:34
Modify onboarding.php to include additional pages
return array(
'dependencies' => array(
'plugins' => array(
array(
'name' => __( 'Atomic Blocks', 'genesis-sample' ),
'slug' => 'atomic-blocks/atomicblocks.php',
),
),
),
'content' => array(
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active May 3, 2024 12:55
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@nickcernis
nickcernis / add-editor-layout-classes.js
Last active February 20, 2020 09:09
Add Genesis layout class to Gutenberg editor pages (admin)
// Add genesis layout classes to the Block Editor.
// File lives in the theme's /js/ folder.
wp.domReady(function () {
yourTheme.updateLayoutClass();
var layouts = document.querySelector(".genesis-layout-selector");
if( layouts ) {
layouts.addEventListener("input", function (e) {
yourTheme.updateLayoutClass();
@JiveDig
JiveDig / facetwp-pagination-genesis-markup.php
Last active September 24, 2021 18:54
Adjust FacetWP's pager html to match Genesis markup. This allows it to inherit the Genesis theme styles. Used with [facetwp pager="true"]
<?php
/**
* Style pagination to look like Genesis.
*
* @version 1.0.0
*
* @author Mike Hemberger @JiveDig
*
* @link https://gist.github.com/JiveDig/b9810ba4c322d7757993159ed9ccb61f
@timothyjensen
timothyjensen / functions.php
Last active October 13, 2019 05:14
Retrieves all post meta data according to the structure in the $config array. Provides a convenient and more performant alternative to ACF's `get_field()`. This function is especially useful when working with ACF repeater and flexible content fields. See details at https://www.timjensen.us/acf-get-field-alternative.
<?php
/**
* Retrieves all post meta data according to the structure in the $config
* array.
*
* Provides a convenient and more performant alternative to ACF's
* `get_field()`.
*
* This function is especially useful when working with ACF repeater fields and
* flexible content layouts.
@srikat
srikat / class-custom-featured-post.php
Last active April 3, 2022 16:29 — forked from GaryJones/readme.md
Custom Featured Posts Widget plugin: Skeleton for amending the output of the Genesis Featured Posts widget. https://sridharkatakam.com/custom-featured-post-widget-plugin/
<?php
/**
* Plugin Name
*
* @package Custom_Featured_Post_Widget
* @author Gary Jones
* @license GPL-2.0+
* @link http://gamajo.com/
* @copyright 2013 Gary Jones, Gamajo Tech
*/
@WAcode27
WAcode27 / impress-property-showcase-custom.css
Last active February 4, 2021 19:52
IDX Broker IMPress PropertyShowcase for Agent Focused Pro - url
/* IDX Broker IMPress Property Showcase - Default style unchecked
* By https://github.com/mjsdiaz
----------------------------------------------------------------------------------------------- */
.front-page-3 .impress-showcase-widget .widget-title {
color: #fff;
font-size: 60px;
font-size: 6rem;
font-weight: 300;
letter-spacing: 0;
@WAcode27
WAcode27 / impress-omnibar-search-custom.css
Last active September 15, 2021 21:53
IDX Broker IMPress Omnibar Search for Agent Focused Pro - url
/* Search Bar IDX Broker IMPress Omnibar - Default style unchecked
* By https://github.com/mjsdiaz
----------------------------------------------------------------------------------------------- */
.widget.IDX_Omnibar_Widget {
background-color: #566473;
color: #fff;
padding: 30px;
}
@robincornett
robincornett / functions-01.php
Last active November 27, 2017 08:25
Responsive menus for HTML5 Genesis themes. with updating skip links. The skip links must follow the pattern established in Genesis core.
<?php
//do not include the opening tag!
// Required Scripts and Styles
add_action( 'wp_enqueue_scripts', 'leaven_load_scripts', 15 );
function leaven_load_scripts() {
// Responsive Navigation
wp_enqueue_style( 'fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), '4.3.0' );