Skip to content

Instantly share code, notes, and snippets.

View fernandiez's full-sized avatar

Fernan fernandiez

View GitHub Profile
@anant1811
anant1811 / acf-genesis-template.php
Last active December 4, 2019 06:54
ACF with Genesis Page templates
<?php
/**
* ACF compatible genesis page template
*
* @author StudioPress
* @package Altitude
* @subpackage Customizations
*/
/*
@digitalchild
digitalchild / functions.php
Last active January 25, 2017 21:28
Custom Taxonomy
<?php
// This code goes in your theme's functions.php
function form_caracteristica( $object_id ) {
WCVendors_Pro_Form_helper::select2( array(
'post_id' => $object_id,
'id' => 'wcv_custom_product_caracteristicas[]',
'class' => 'select2',
'label' => __('Caracteristicas', 'wcvendors-pro'),
'show_option_none' => __('Select a caracteristicas', 'wcvendors-pro'),
@KFleeger
KFleeger / enews.css
Last active September 27, 2016 15:51
Styles to add to a genesis child theme to create a horizontal opt-in for the enews extended plugin.
/*
Enews Plugin
-----------------------------------------------------------------*/
.home-cta .enews p {
width: 50%;
float: left;
clear: none;
font-size: 28px;
margin-right: 4%;
@lucymtc
lucymtc / ejemplos-hooks-wpvalencia.php
Created April 13, 2016 22:42
Ejemplos meetup WPValencia Introducción a hooks
<?php
/**
* Plugin Name: Ejemplos WPValencia meetup
* Plugin URI: http://wordpress.org/plugins
* Description: Ejemplos para presentacion Introducción a los hooks.
* Version: 0.0.1
* Author: Lucy Tomas
* Author URI: http://lucytomas.com
* License: GPLv2+
*/
@bentasm1
bentasm1 / functions.php
Last active July 10, 2016 16:28
WC Vendors - Notify anyone registering in WooCommerce on Checkout or My Account Page about strong password requirement.
OPTION 1 - Add a warning that you need a stronger password.
/* WC Vendors - Add a "Need a strong password" notice to the My Account Page */
add_action( 'woocommerce_register_form', 'wcvendors_notify_password_myaccount' );
function wcvendors_notify_password_myaccount() {
echo '<strong>Important</strong> -- This site respects your security. We require all new members to use a strong password. If you can not click the Register button, <strong>you need a stronger password</strong>.<br><br>';
}
/* WC Vendors - Add a "Need a strong password" notice to the Checkout Page */
add_action( 'woocommerce_after_checkout_registration_form', 'wcvendors_notify_password_checkout' );
function wcvendors_notify_password_checkout() {
@JRGould
JRGould / index.ios.js
Last active May 24, 2017 07:46
Deep Thoughts React-Native App v 0.1
/**
* DeepThoughts App v 0.1
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
@JRGould
JRGould / index.ios.js
Last active May 24, 2017 07:46
DeepThoughts React-Native App Starter Template
/**
* DeepThoughts Template
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
@mjsdiaz
mjsdiaz / functions.php
Last active December 15, 2020 23:11
Add Third or Footer Navigation Menu to Genesis Child Theme - https://amethystwebsitedesign.com/add-third-footer-navigation-menu-to-genesis-child-theme
<?php
// Remove the line above when adding to functions.php
// Add theme support for new menu
// Add New Footer Menu; Keep Primary and Secondary Menus
add_theme_support ( 'genesis-menus' , array (
'primary' => __( 'Primary Navigation Menu', 'genesis' ),
'secondary' => __( 'Secondary Navigation Menu', 'genesis' ),
'footer' => __( 'Footer Navigation Menu', 'genesis' )
) );
// Get all events from 1 week before the present date to 1 week in the future
$events = tribe_get_events( array(
'start_date' => date( 'Y-m-d H:i:s', strtotime( '-1 week' ) ),
'end_date' => date( 'Y-m-d H:i:s', strtotime( '+1 week' ) ),
'eventDisplay' => 'custom',
'posts_per_page' => -1
));
@neilgee
neilgee / acf-repeater.php
Last active December 28, 2017 21:50
ACF Repeater layout in Genesis
<?php
add_action( 'genesis_before_loop', 'trs_testimonial_repeater_page' );
function trs_testimonial_repeater_page () {
//My ACF Fields for reference
//testimonials - field group
//testimonial - sub-field
//testimonial_header - sub-field