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
<?php | |
/** | |
* Numeric Page Navigation Bootstrap Style | |
*/ | |
function tibs_page_navi($before = '', $after = '') { | |
global $wpdb, $wp_query; | |
$request = $wp_query->request; | |
$posts_per_page = intval(get_query_var('posts_per_page')); | |
$paged = intval(get_query_var('paged')); |
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
<?php | |
// Always show Kitchen Sink in WYSIWYG Editor | |
add_filter( 'tiny_mce_before_init', 'yourprefix_unhide_kitchensink' ); | |
function yourprefix_unhide_kitchensink($args) { | |
$args['wordpress_adv_hidden'] = 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
<?php | |
// Load custom favicon | |
add_filter( 'genesis_pre_load_favicon', 'custom_favicon_filter' ); | |
function custom_favicon_filter( $favicon_url ) { | |
return CHILD_URL .'/images/favicon.ico'; | |
} |
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
<?php | |
// http://www.gravityhelp.com/forums/topic/conditional-logic-for-user-notifications | |
// update the "2" to the ID of your form | |
add_filter('gform_pre_submission_filter_2', 'your_prefix_conditional_message'); | |
function your_prefix_conditional_message($form){ | |
// update the "7_1" following "input_" to the IDs of your fields | |
$choice1 = RGForms::post('input_7_1'); | |
$choice2 = RGForms::post('input_7_2'); | |
$choice3 = RGForms::post('input_7_3'); |
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
<?php | |
/** Add Custom images sizes to Media Uploader */ | |
add_filter( 'image_size_names_choose', 'your_image_size_names_choose' ); | |
function your_image_size_names_choose( $sizes ) { | |
$sizes = get_intermediate_image_sizes(); | |
$add_sizes = array(); |
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
<?php | |
add_filter( 'genesis_attr_content', 'yoast_schema_empty', 20 ); | |
add_filter( 'genesis_attr_entry', 'yoast_schema_event', 20 ); | |
add_filter( 'genesis_attr_entry-title', 'yoast_itemprop_name', 20 ); | |
add_filter( 'genesis_attr_entry-content', 'yoast_itemprop_description', 20 ); | |
add_filter( 'genesis_post_title_output', 'yoast_title_link_schema', 20 ); | |
/** | |
* We'll use the post info output to add more meta data about the event. |
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
<?php | |
$select = '<select>'; | |
$forms = RGFormsModel::get_forms( null, 'title' ); | |
foreach( $forms as $form ): | |
$select .= '<option id="' . $form->id . '">' . $form->title . '</option>'; | |
endforeach; | |
$select .= '</select>'; | |
echo "GF dropdown: $select"; |
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
/* 4 column Gravity Forms custom ready class ------------------------------------------------------*/ | |
.gform_wrapper .top_label li.gfield.gf_first_quarter, | |
.gform_wrapper .top_label li.gfield.gf_second_quarter, | |
.gform_wrapper .top_label li.gfield.gf_third_quarter, | |
.gform_wrapper .top_label li.gfield.gf_fourth_quarter { | |
margin:0 0 8px 0; | |
width:24%; | |
} |
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
<?php | |
// Dynamically add Bootstrap column classes to footer widgets, depending on how many widgets are present | |
add_filter('dynamic_sidebar_params','tibs_footer_sidebar_params'); | |
function tibs_footer_sidebar_params($params) { | |
$sidebar_id = $params[0]['id']; | |
if ( $sidebar_id == 'sidebar-footer' ) { |
OlderNewer