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
<?php | |
add_action( 'tgmsp_callback_start', 'tgm_soliloquy_remove_image_attr' ); | |
function tgm_soliloquy_remove_image_attr( $id ) { | |
$script = 'var slides = $(slider).find(".soliloquy-slides > li img");'; | |
$script .= '$(slides).each(function(i){'; | |
$script .= '$(this).removeAttr("width height");'; | |
$script .= '});'; | |
echo $script; | |
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
<?php | |
//* Turn off pingbacks globably | |
add_filter( 'xmlrpc_methods', 'remove_xmlrpc_pingback_ping' ); | |
function remove_xmlrpc_pingback_ping( $methods ) { | |
unset( $methods['pingback.ping'] ); | |
return $methods; | |
} ; |
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
<?php | |
//* Remove the link from each post title | |
add_filter( 'genesis_post_title_output', 'ytn_post_title_output', 15 ); | |
function ytn_post_title_output( $title ) { | |
$title = sprintf( '<h2 class="entry-title">%s</h2> ', apply_filters( 'genesis_post_title_text', get_the_title() ) ); | |
return $title; | |
} |
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
<?php | |
//* Custom loop to show work items | |
add_action( 'genesis_loop', 'soulo_work_loop' ); | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
function be_archive_post_class( $classes ) { | |
$classes[] = 'one-third'; | |
global $wp_query; | |
if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % 3 ) |
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
<?php | |
// White label Envira Gallery | |
add_filter( 'gettext', 'tgm_envira_whitelabel', 10, 3 ); | |
function tgm_envira_whitelabel( $translated_text, $source_text, $domain ) { | |
// If not in the admin, return the default string. | |
if ( ! is_admin() ) { | |
return $translated_text; | |
} |
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
<?php | |
/** | |
* Genesis custom loop | |
*/ | |
function be_custom_loop() { | |
global $post; | |
// arguments, adjust as needed | |
$args = array( |
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
<?php | |
// Don't Strip HTML from Excerpts or Content Limit | |
add_filter('get_the_content_limit_allowedtags', 'childtheme_custom_allowedtags'); | |
function childtheme_custom_allowedtags() { | |
return '<script>,<style>,<strong>,<b>,<br>,<em>'; //add whatever tags you want to this string | |
} |
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
<?php | |
/** | |
* Add Soliloquy slider to posts and pages. | |
*/ | |
add_filter( 'soliloquy_skipped_posttypes', 'tgm_soliloquy_skipped_posttypes' ); | |
function tgm_soliloquy_skipped_posttypes( $post_types ) { | |
unset( $post_types['post'] ); | |
unset( $post_types['page'] ); | |
return $post_types; |
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
<?php | |
/** | |
* Add Soliloquy defaults. | |
*/ | |
add_filter( 'soliloquy_defaults', 'tgm_soliloquy_default_settings', 20, 2 ); | |
function tgm_soliloquy_default_settings( $defaults, $post_id ) { | |
$defaults['slider_width'] = 800; // Slider width. | |
$defaults['slider_height'] = 400; // Slider height. | |
$defaults['control'] = 0; // Turns navigation pagination off by default. |
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
<?php | |
// Add custom post types to archives | |
function namespace_add_custom_types( $query ) { | |
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
$post_types = get_post_types( '', 'names' ); | |
$query->set( 'post_type', $post_types); | |
return $query; | |
} | |
} |