Skip to content

Instantly share code, notes, and snippets.

View wp-travel-customize-email
// Function to change email address
function wpb_sender_email( $original_email_address ) {
return 'ADMIN EMAIL';
}
// Function to change sender name
function wpb_sender_name( $original_email_from ) {
return 'YOUR COMPANY NAME';
}
View travel-log-child
function travel_log_rearrange_home_page_sections(){
remove_action( 'travel_log_front_page_content', 'travel_log_front_page_post_filter_wrap', 20 );
remove_action( 'travel_log_front_page_content', 'travel_log_front_page_call_to_action_wrap', 30 );
remove_action( 'travel_log_front_page_content', 'travel_log_front_page_latest_posts_wrap', 60 );
remove_action( 'travel_log_front_page_content', 'travel_log_front_page_testimonials_wrap', 50 );
add_action( 'travel_log_front_page_content', 'travel_log_front_page_latest_posts_wrap', 30 );
add_action( 'travel_log_front_page_content', 'travel_log_front_page_post_filter_wrap', 50 );
add_action( 'travel_log_front_page_content', 'travel_log_front_page_call_to_action_wrap', 60);
View travel-log-child
/**
* [travel_log_social_share_meta Diusplay the Social share Blog Meta]
*
* @since 1.0.0
*/
function travel_log_social_share_meta() {
$social_share_disable = travel_log_get_theme_option( 'travel_log_social_share_disable' );
View business-field-pro-child
function business_field_render_featured_slider( $slider_details = array() ) {
if ( empty( $slider_details ) ) {
return;
}
$featured_slider_transition_effect = business_field_get_option( 'featured_slider_transition_effect' );
$featured_slider_enable_caption = business_field_get_option( 'featured_slider_enable_caption' );
$featured_slider_caption_alignment = business_field_get_option( 'featured_slider_caption_alignment' );
$featured_slider_enable_arrow = business_field_get_option( 'featured_slider_enable_arrow' );
View personify-pro-custom-code
function personify_pro_get_content( $i, $int ) {
$options = personify_pro_get_theme_options();
$class = ( has_post_thumbnail() ) ? '' : 'no-post-thumbnail';
$class .= ( 1 === $int ) ? ' add-gap' : '';
$class .= ( ( $i % 3 == 0 ) && $i !== 0 && is_home() ) ? ' clear-left' : '';
$class .= ( ( $i % 2 == 0 ) && $i !== 0 && is_home() ) ? ' clear-left-responsive' : '';
$img_size = ( is_sticky() && is_home() ) ? 'full' : 'large';
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( esc_attr( $class ) ); ?>>
View wp-travel-customize-text
function wp_travel_customize_text_booking_form_field( $fields ) {
if ( is_array( $fields ) ) {
$new_fields = array();
foreach( $fields as $f_k => $f_v ) {
if ( 'booking_option' === $f_k ) {
View wp-travel-customize
function wp_travel_custom_gettext_string_editor( $string ){
switch ($string) {
case '%s Day(s) %s Night(s)':
return '%s Hour(s) %s Minute(s)';
break;
case 'Day(s)' :
View wp-travel-child
function travel_log_child_remove_cat_titles($title) {
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
View wp-travel-child-js
jQuery(document).ready(function($) {
if ('' !== wp_travel.lat && '' !== wp_travel.lng) {
// Create map.
var map = new GMaps({
div: '#wp-travel-map',
lat: wp_travel.lat,
lng: wp_travel.lng,
scrollwheel: false,
navigationControl: false,
mapTypeControl: false,
View wp-travel-child-js
jQuery(document).ready(function($) {
if ('' !== wp_travel.lat && '' !== wp_travel.lng) {
// Create map.
var map = new GMaps({
div: '#wp-travel-map',
lat: wp_travel.lat,
lng: wp_travel.lng,
scrollwheel: false,
navigationControl: false,
mapTypeControl: false,
You can’t perform that action at this time.