This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Edit 0 - 2015-11-05 16:55:34 - Init | |
// Edit 1 - 2015-11-05 17:04:18 - Add global and short circuit | |
// Edit 2 - 2015-11-05 17:17:44 - Add is_tree | |
// Edit 3 - 2015-11-05 17:39:14 - Remove is_tree, use get_post_ancestors | |
// Hook into the 'body_class' filter with the name of a unique function | |
add_filter( 'body_class', 'page_parent_specific_body_classes' ); | |
// Callback function for adding a class to the body element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wp_terms_checklist_args', 'eric_loz_category_fixer', 10, 2); | |
public function eric_loz_category_fixer( $args, $post_id ) { | |
$args['checked_ontop'] = false; | |
return $args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='gf_browser_chrome gform_wrapper' id='gform_wrapper_1' style='display:none'> | |
<a id='gf_1' name='gf_1' class='gform_anchor' ></a> | |
<form method='post' enctype='multipart/form-data' id='gform_1' action='/get-started/#gf_1'> | |
<div id='gf_progressbar_wrapper_1' class='gf_progressbar_wrapper'> | |
<h3 class='gf_progressbar_title'>Step 2 of 3 | |
</h3> | |
<div class='gf_progressbar'> | |
<div class='gf_progressbar_percentage percentbar_blue percentbar_66' style='width:66%;'><span>66%</span></div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form: | |
action: 'do/this' | |
class: 'questionaire' | |
short: | |
name: 'First Name' | |
label: 'first-name' | |
short: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Page Slug Body Class | |
// http://www.wpbeginner.com/wp-themes/how-to-add-page-slug-in-body-class-of-your-wordpress-themes/ | |
function add_slug_body_class( $classes ) { | |
global $post; | |
if ( isset( $post ) ) { | |
$classes[] = $post->post_type . '-' . $post->post_name; | |
} | |
return $classes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="tabs-wrapper"> | |
<input type="radio" name="tab" id="tab1" class="tab-head" checked="checked"/> | |
<label for="tab1">One</label> | |
<input type="radio" name="tab" id="tab2" class="tab-head" /> | |
<label for="tab2">Two</label> | |
<input type="radio" name="tab" id="tab3" class="tab-head" /> | |
<label for="tab3">Three</label> | |
<input type="radio" name="tab" id="tab4" class="tab-head" /> | |
<label for="tab4">Four</label> | |
<div class="tab-body-wrapper"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'genesis_pre_load_favicon', 'patchworks_custom_favicon' ); | |
/** | |
* Adds custom favicon from child theme directory | |
* | |
* @author caseypatrickdriscoll casey@patch.works | |
* | |
* @created 2015-05-12 11:28:06 | |
* | |
* @param string $favicon_url The location of the current favicon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'genesis_parent_theme_enqueue_styles' ); | |
function genesis_parent_theme_enqueue_styles() { | |
wp_enqueue_style( 'patchworks-fontawesome', patchworks_fontawesome() ); | |
} | |
function patchworks_fontawesome() { | |
return 'https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When you only have recurring events, the next month link won't show. Resave the event or add this snippet. | |
// Written by Barry Hughes | |
// Problem thread: http://tri.be/support/forums/topic/one-side-of-month-pagination-missing/ | |
add_action( 'added_post_meta', 'fix_29781_recurrence_pagination', 10, 3 ); | |
function fix_29781_recurrence_pagination( $meta_id, $object_id, $meta_key ) { | |
if ( TribeEvents::POSTTYPE !== get_post_type( $object_id ) ) return; | |
if ( '_EventDuration' !== $meta_key ) return; | |
TribeEvents::instance()->rebuild_earliest_latest(); |