Skip to content

Instantly share code, notes, and snippets.

View lori's full-sized avatar

Lori Berkowitz lori

View GitHub Profile
@lori
lori / hierarchical_page_template_redirect.php
Created January 31, 2013 22:06
Make subcategories inherit parent category templates
<?php
/*
* Make subcategories inherit parent category templates
*/
function hierarchical_page_template_redirect () {
$cat = get_queried_object();
if ( is_category() && $cat->category_parent == 100 ) { // Parent category ID
@lori
lori / category-subcategory-menu.php
Created January 31, 2013 22:16
Category menu with subcategories & shortcode
<?php
/**
* Category menu with subcategories
*/
function bd_subategories_list($parent_cat_id = 100, $list_title = 'Category Name') { // category ID & name
?>
<h3 class="widget-title"><?php echo $list_title ?></h3>
<ul class="xoxo">

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

<?php
/**
* Generate slideshow from ACF gallery field.
*
* A Flexslider (Soliloquy) slider will be created from from images assigned
* via the ACF gallery field type.
*
* The following plugins are needed:
* - Soliloquy
* - Soliloquy Dyanmic Addon
<?php
// Published under GPL
// tutorial here: https://codeable.io/community/how-to-import-json-into-wordpress/
class Developer_Import {
public function __construct() {
add_action( 'wp_ajax_import_developer', array( $this, 'import_developer' ) );
@lori
lori / gmaps-shortcode.php
Last active August 2, 2017 11:26
Adds a google map to a post using coordinates from custom fields
<?php
/**
* Google maps shortcode
*
* Adds a google map to a post using coordinates from custom fields
*
* @return string HTML to show a Google map
*/
function bd_map_sc($atts) {
@lori
lori / 0_reuse_code.js
Created August 11, 2017 22:24
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