- This topic has 5 replies, 3 voices, and was last updated 4 years, 5 months ago by
Support Team.
-
AuthorPosts
-
April 1, 2019 at 7:08 am #12892
max
ParticipantHi sir,
My theme https://www.sunrise.com.my/tours/ after use you code is not work as below in child theme function.php
<?php
/**
*Recommended way to include parent theme styles.
*(Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
*/
add_action( ‘wp_enqueue_scripts’, ‘travel_log_child_style’ );
function travel_log_child_style() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,get_stylesheet_directory_uri() . ‘/style.css’,array(‘parent-style’));
}function wp_travel_customize_sale_price_display( $s, $c, $d ) {
return sprintf( esc_html__(‘From %1s %2s’, ‘wp-travel’ ), $c , $d );
}
add_filter( ‘wp_travel_itinerary_sale_price’, ‘wp_travel_customize_sale_price_display’, 99, 3 );
function wp_travel_customize_price_display( $s, $c, $d ) {
global $wp_travel_itinerary;
if ( $wp_travel_itinerary && $wp_travel_itinerary->is_sale_enabled() ) {
return sprintf( esc_html__(‘From %1s %2s’, ‘wp-travel’ ), $c , $d );
// return $s;
}
return sprintf( esc_html__(‘From %1s %2s’, ‘wp-travel’ ), $c , $d );
}
add_filter( ‘wp_travel_itinerary_price’, ‘wp_travel_customize_price_display’, 99, 3 );function wp_travel_trip_price_customize( $post_id, $hide_rating = false ) {
$settings = wp_travel_get_settings();
$trip_price = wp_travel_get_trip_price( $post_id );
$enable_sale = get_post_meta( $post_id, ‘wp_travel_enable_sale’, true );
$sale_price = wp_travel_get_trip_sale_price( $post_id );
$currency_code = ( isset( $settings[‘currency’] ) ) ? $settings[‘currency’] : ”;
$currency_symbol = wp_travel_get_currency_symbol( $currency_code );
$per_person_text = wp_travel_get_price_per_text( $post_id );
// $wp_travel_itinerary = new WP_Travel_Itinerary();
?>
<div class=”wp-detail-review-wrap”>
<?php do_action( ‘wp_travel_single_before_trip_price’, $post_id, $hide_rating ); ?>
<div class=”wp-travel-trip-detail”>
<?php if ( ” != $trip_price || ‘0’ != $trip_price ) : ?>
<div class=”trip-price” >
<?php if ( $enable_sale ) : ?>
<span><?php echo apply_filters( ‘wp_travel_itinerary_price’, sprintf( ‘ %s %s ‘, $currency_symbol, $trip_price ), $currency_symbol, $trip_price ); ?></span>
<?php endif; ?>
<span class=”person-count”>
<ins>
<span>
<?php
if ( $enable_sale ) {
echo apply_filters( ‘wp_travel_itinerary_sale_price’, sprintf( ‘ %s %s’, $currency_symbol, $sale_price ), $currency_symbol, $sale_price );
} else {
echo apply_filters( ‘wp_travel_itinerary_price’, sprintf( ‘ %s %s ‘, $currency_symbol, $trip_price ), $currency_symbol, $trip_price );
}
?>
</span>
</ins>
<?php if ( ! empty( $per_person_text ) ) : ?>
/<?php echo esc_html( $per_person_text ); ?>
<?php endif; ?>
</span>
</div>
<?php endif; ?>
</div>
<?php do_action( ‘wp_travel_single_after_trip_price’, $post_id, $hide_rating ); ?>
</div><?php
}
remove_action( ‘wp_travel_after_single_title’, ‘wp_travel_trip_price’, 1 );
add_action( ‘wp_travel_after_single_title’, ‘wp_travel_trip_price_customize’, 0 );function travel_log_front_page_slider_wrap() {
if ( ! is_front_page() || is_home() ) {
return;
}$enabled = travel_log_get_theme_option( ‘home_slider_enable’ );
if ( ! is_customize_preview() && false === $enabled && ! is_home() ) {
return;
}
echo ‘<div id=”travel-log-front-page-slider-wrap” class=”travel-log-show-partial-edit-shortcut”>’;
echo do_shortcode(‘[smartslider3 slider=1]’);
echo ‘</div>’;
}April 1, 2019 at 11:27 am #12916wensolutions
KeymasterApril 2, 2019 at 6:41 am #12975max
ParticipantCan i send you the functions.php file for amendment?
April 2, 2019 at 11:57 am #13013Support Team
KeymasterHello @max,
As for the slider problem, we are unable help you on this as this issue is not related to the plugin or theme and to make the third party plugin slider work through the use of child theme requires higher code customization.
Hope you understand.
As for the issue regarding the child theme, please provide us the admin login detail so that we can inspect the child theme further and find out why exactly it is not working upon adding the custom code.
Hoping to hear from you soon.
Thank you.
April 3, 2019 at 1:32 am #13023max
ParticipantHi, just update i was solve the problem already. Thank
April 3, 2019 at 4:08 am #13027Support Team
Keymaster -
AuthorPosts
- The forum ‘WP Travel’ is closed to new topics and replies.