- This topic has 6 replies, 3 voices, and was last updated 4 years, 2 months ago by
wensolutions.
- AuthorPosts
- March 29, 2019 at 10:58 am #12795
max
ParticipantTo WP Travel Theme Officer,
Firstly, thank for your create the good plugin and i quite satisfied it.
But, after i add the child theme and insert the code for present the tour price starting From MYR1,000 but the main page thumbnail is still not yet show the wording and may i know how to solve this problem?March 29, 2019 at 11:37 am #12796Support Team
KeymasterHello @max,
Actually we are not quite clear which code you pasted but to add the from text in the post filter section of front page please follow below given steps:
For this at first create the folder “template-parts”. Inside this folder create folder “wp-travel” and inside “wp-travel” create the file “itinerary-item.php”.
Now paste below given code in the file “itinerary-item.php”
Finally go to Admin Panel > Appearance > Customize > Additonal CSS and paste the CSS.
.trip-details .trip-price i { color: #fff; }
This will make the price appear in the post filter section of the front page.
Hope this helps.
Thank you.
April 1, 2019 at 1:26 am #12859max
ParticipantHi Sir,
Thank for reply.
I already add on the code as below and look ok in https://www.sunrise.com.my/tours/itinerary/7d6n-jeju-island-seoul-akor-d7-07/but no ok in the main page thumbnail didn’t show the wording from https://www.sunrise.com.my/tours/
<?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 );April 1, 2019 at 1:47 am #12860max
ParticipantHi Sir,
I create it in child theme it’s not work but done and ok if i do it in original theme and not child theme
April 1, 2019 at 3:52 am #12866Support Team
KeymasterHello @max,
But we always recommend going through the child theme for any modification in the parent theme. If you directly modify the parent theme then the modification will be lost upon update to the recent version of the theme.
So we request you to check your child theme setting and fix so that the code works fine even with the child theme.
Thank you.
April 1, 2019 at 6:31 am #12878max
ParticipantIt’s cant and no work.
April 1, 2019 at 11:19 am #12914wensolutions
KeymasterHello @max,
We would like to apologize for the trouble. Can you please provide your login detail in the email below for the proper inspection further?
Email: wptravel.io@gmail.com
Hoping to hear from you soon.
Thank you.
- AuthorPosts
- The forum ‘WP Travel’ is closed to new topics and replies.