Skip to content

Instantly share code, notes, and snippets.

View geeac's full-sized avatar

Eugenia Cosinschi geeac

View GitHub Profile
@geeac
geeac / genesis_custom_loop.php
Created March 4, 2020 15:33 — forked from JiveDig/genesis_custom_loop.php
wp_query using genesis_custom_loop. To alter content use standard genesis add_action and remove_action hooks
<?php
//* Custom loop WITH pagination
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'bhl_do_resident_query' );
function bhl_do_resident_query() {
global $paged;
global $query_args;
@geeac
geeac / functions.php
Created June 8, 2019 11:09
Enqueue Google Fonts.
<?php
//* Do NOT include the opening php tag
//* Load Lato and Merriweather Google fonts
add_action( 'wp_enqueue_scripts', 'bg_load_google_fonts' );
function bg_load_google_fonts() {
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,700|Merriweather:300,700', array(), CHILD_THEME_VERSION );
}
@geeac
geeac / README.md
Last active February 15, 2019 10:01 — forked from i2000s/README.md
Add an Export-to-Outlook button for The Events Calendar

This code snipet is based on the events-calendar-outlook-import-fix code. It is aiming at adding a button on the Wordpress Event page to let users export event to various calendars.

Code is licensed under the GPL 2.0 or greater license.

@geeac
geeac / functions.php
Created October 15, 2016 08:21 — forked from eugenoprea/functions.php
Genesis Previous/Next Post Post Navigation
/** Genesis Previous/Next Post Post Navigation */
add_action( 'genesis_before_comments', 'eo_prev_next_post_nav' );
function eo_prev_next_post_nav() {
if ( is_single() ) {
echo '<div class="prev-next-navigation">';
previous_post_link( '<div class="previous">Previous article: %link</div>', '%title' );
@geeac
geeac / ninja-forms-add-email-attachment.php
Created February 21, 2016 12:55 — forked from kjohnson/ninja-forms-add-email-attachment.php
Add an Attachment to Email Notifications in Ninja Forms
<?php
/*
Plugin Name: Ninja Forms Email Attachment
*/
function add_my_attachment( $attachments ) {
$attachments[] = 'server_path_to_my_file';
return $attachments;
}
@geeac
geeac / gist:b4884df26e0269490647
Created February 19, 2016 12:00 — forked from zachskaggs/gist:469935ff6c0847494402
Ninja Forms Timestamp
<?php
/*
Plugin Name: Example Plugin
*/
<?php
function my_ninja_forms_date_code(){
//Declare $ninja_forms_processing as a global variable.
global $ninja_forms_processing;
//only process this code on the form ID 1
$form_id = $ninja_forms_processing->get_form_ID();
@geeac
geeac / provision-post.sh
Created October 11, 2015 08:01 — forked from aaroneaton/provision-post.sh
Setup themes & plugins after VVV provision
# Get rid of the default crap
wp site empty --yes
# Remove Hello Dolly (sorry Matt)
wp plugin uninstall hello
# Install Genesis framework
wp theme install <super-secret-url-for-genesis>
# Install plugins available in repo
@geeac
geeac / functions.php
Last active September 17, 2015 08:03 — forked from srikat/functions.php
How to add Beautiful Pro’s mobile responsive menu in other Genesis themes. http://sridharkatakam.com/add-beautiful-pros-mobile-responsive-menu-genesis-themes/
// Enqueue scripts and styles
add_action( 'wp_enqueue_scripts', 'custom_scripts_styles_mobile_responsive' );
function custom_scripts_styles_mobile_responsive() {
wp_enqueue_script( 'beautiful-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_style( 'dashicons' );
}
@geeac
geeac / css_resources.md
Last active September 10, 2015 11:15 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@geeac
geeac / 0_reuse_code.js
Last active September 10, 2015 11:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console