Skip to content

Instantly share code, notes, and snippets.

View Nahuai's full-sized avatar

Nahuai Badiola Nahuai

View GitHub Profile
@lelandf
lelandf / snippet.php
Last active October 20, 2022 08:43
[RCP] Example of checking if user has content dripped yet
<?php
// Requires both RCP & Drip Content active
add_action( 'wp_footer', function() {
$membership_id = 1;
$post_id = 31;
$membership = rcp_get_membership( $membership_id );
$can_access = \RCP\Addon\DripContent\Visibility\membership_can_access( true, $membership_id, $post_id, $membership );
@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(
@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();
@BinaryMoon
BinaryMoon / get-post-gallery.php
Last active May 1, 2021 13:03
Make WordPress function Get_Post_Gallery work for Gutenberg powered sites.
<?php
/**
* Plugin Name: Get Post Gallery Polyfill
* Plugin URI: https://prothemedesign.com
* Description: Make Get_Post_Gallery work for Gutenberg powered sites.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
*
* @package ptd
@felixarntz
felixarntz / wp-alignment-classes.css
Created November 24, 2017 15:52
New WordPress alignment classes introduced by Gutenberg
/* -------------------------------------------------------------
# Variables
------------------------------------------------------------- */
$site_maxwidth: 72rem; // Maximum width the entire site should not exceed
$site_maxwidth-text: 40rem; // Maximum width the main content text should not exceed
$spacing_horizontal: 1rem; // General horizontal padding
/* -------------------------------------------------------------
# General Styles
@mgibbs189
mgibbs189 / custom-loop.php
Last active September 1, 2022 13:25 — forked from SauntValerian/gist:a79845e301de969017e714a96ffee6da
Multiple Loops for FacetWP
<?php
$args = array(
'post_type' => 'location',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'title',
'facetwp' => true,
'tax_query' => array(
array(
'taxonomy' => 'advertiser-level',
@bUxEE
bUxEE / gf_css.css
Created March 21, 2017 09:19
Gravity forms css styling
/* GRAVITY FORMS */
select:focus, input[type="file"]:focus, input[type="radio"]:focus {
outline: none !important;
}
.gform_wrapper .gform_body {
width:100%!important;
}
@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
*/