This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 [email protected] | |
* | |
* @created 2015-05-12 11:28:06 | |
* | |
* @param string $favicon_url The location of the current favicon |
This file contains hidden or 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 hidden or 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(); |
This file contains hidden or 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
// NOTE: This won't fully work, as the date format is changed back with javascript | |
// once the user selects a date with the date picker. | |
// Add this to your active theme's functions.php | |
add_filter( 'tribe_community_events_get_start_date', 'tribe_change_community_events_date_format' ); | |
function tribe_change_community_events_date_format( $date, $event_id ) { | |
$date = date( 'y-m-d', strtotime( $date ) ); // change date configuration to desired | |
return $date; | |
} |