Skip to content

Instantly share code, notes, and snippets.

David Perez davidperezgar

Block or report user

Report or block davidperezgar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@westonruter
westonruter / amp-gravity-form-submission-shim.php
Last active Oct 2, 2019
AMP shim support for Gravity Form submissions
View amp-gravity-form-submission-shim.php
<?php
/*
* Plugin Name: AMP shim support for Gravity Form submissions
* Plugin URI: https://gist.github.com/westonruter/b2554073461707a88057bb86b6b603d6
* Version: 0.1.0
* Author: Weston Ruter
* Author URI: https://weston.ruter.net/
* License: GNU General Public License v2 (or later)
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
View my_proxy_file.php
<?php
/*
################### READ ME #################################
You must create a proxy file that retrieves your import file from FTP and then returns it.
You will then call that file with the 'Download from URL' option in WP All Import.
This is an example of such a proxy file. This is provided in the hopes it is useful, but without any support.
###############################################################
Instructions:
* Copy the code below to a new php file in the root of your WP site
* Update the FTP server details
@ahmadawais
ahmadawais / flywheel-local-xdebug-vscode.md
Last active Dec 4, 2019
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro
View flywheel-local-xdebug-vscode.md

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
View gulpfile.js
var gulp = require('gulp'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
sourcemaps = require('gulp-sourcemaps'),
livereload = require('gulp-livereload'),
input = {
'sass': [
'sass/**/*.scss'
]
View README.md

Custom Editable Gutenberg Block

This is a basic custom editable Gutenberg block. Files explained below.

  • block.js — We register Custom Gutenberg block here.
  • editor.css _ Block CSS for the editor.
  • style.css — Block CSS for the front end.
  • index.php — Enqueue block's assets for the editor and the front end.
View functions.php
<?php // Do not add this line
// Reduce the primary navigation menu to two levels depth.
add_filter( 'wp_nav_menu_args', 'genesis_sample_primary_menu_args' );
function genesis_sample_primary_menu_args( $args ) {
if ( 'primary' != $args['theme_location'] ) {
return $args;
}
@davidperezgar
davidperezgar / functions.php
Created Oct 31, 2016 — forked from srikat/functions.php
Add Content below Title for Posts page inside div.posts-page-description in Genesis. https://sridharkatakam.com/adding-content-title-inside-div-posts-page-description-genesis/
View functions.php
// Bring back the missing editor for Posts page
add_action( 'edit_form_after_title', 'rgc_posts_page_edit_form' );
function rgc_posts_page_edit_form( $post ) {
$posts_page = get_option( 'page_for_posts' );
if ( $posts_page === $post->ID ) {
add_post_type_support( 'page', 'editor' );
}
@srikat
srikat / functions.php
Last active Apr 9, 2019
Add Content below Title for Posts page inside div.posts-page-description in Genesis. https://sridharkatakam.com/adding-content-title-inside-div-posts-page-description-genesis/
View functions.php
// Bring back the missing editor for Posts page
add_action( 'edit_form_after_title', 'rgc_posts_page_edit_form' );
function rgc_posts_page_edit_form( $post ) {
$posts_page = get_option( 'page_for_posts' );
if ( $posts_page === $post->ID ) {
add_post_type_support( 'page', 'editor' );
}
@davidperezgar
davidperezgar / functions.php
Created Sep 6, 2016 — forked from bgardner/functions.php
Remove a layout with the Genesis Framework.
View functions.php
<?php
//* Do NOT include the opening php tag
//* Remove content/sidebar layout
genesis_unregister_layout( 'content-sidebar' );
//* Remove sidebar/content layout
genesis_unregister_layout( 'sidebar-content' );
//* Remove content/sidebar/sidebar layout
@graylaurenm
graylaurenm / functions.php
Last active May 14, 2018
Genesis infinite scroll, supporting column classes, custom settings by page, and both auto + button loading
View functions.php
<?php
/**
*
* Infinite Scroll
*
* @since 1.0.0
*
* @author Lauren Gray
* @author Bill Erickson
You can’t perform that action at this time.