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
/* | |
* SearchWP Filter - Join the postmeta table so we can grab the resource publication date to add weight to it later. | |
*/ | |
function hnn_searchwp_query_main_join( $sql, $engine ) { | |
global $wpdb; | |
if (isset($_GET['test']) && $_GET['test'] == 'true') { | |
$meta_key = 'publication_date'; // the meta_key you want to order by | |
$sql = $sql . " LEFT JOIN {$wpdb->postmeta} ON {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '{$meta_key}'"; | |
} | |
echo $sql . '<br/><br/>'; |
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
function vc_update_defaults() { | |
// Default single image to size "full" | |
$param = WPBMap::getParam( 'vc_single_image', 'img_size' ); | |
$param['value'] = 'full'; | |
vc_update_shortcode_param( 'vc_single_image', $param ); | |
// Modify button 2 styles to use custom colors | |
$colors_arr = array( | |
__( 'Custom Color #1', 'js_composer' ) => 'custom_classname_1', | |
__( 'Custom Color #2', 'js_composer' ) => 'custom_classname_2' |
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
$(function() { | |
// Promo rollovers | |
$('.promo').mouseover(function() { | |
$(this).addClass('over'); | |
}).mouseout(function() { | |
$(this).removeClass('over'); | |
}).click(function() { | |
location.href = $(this).find('a').attr('href'); | |
}); | |
}); |
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_filter( 'wooslider_slides_layout_html', 'wooslider_custom_content', 10, 3); | |
function wooslider_custom_content ( $content, $args, $post ) { | |
global $post; | |
$image = get_the_post_thumbnail( get_the_ID() ); | |
if ( 'true' == $args['link_slide'] || 1 == $args['link_slide'] ) { | |
$wooslider_url = get_post_meta( get_the_ID(), '_wooslider_url', true ); |