Slider Shortcode Problem

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12892
    max
    Participant

    Hi 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>’;
    }

    #12916
    wensolutions
    Keymaster

    Hello @max,

    Please provide the login detail so that we can inspect the issue further.

    Thank you.

    #12975
    max
    Participant

    Can i send you the functions.php file for amendment?

    #13013
    Support Team
    Keymaster

    Hello @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.

    #13023
    max
    Participant

    Hi, just update i was solve the problem already. Thank

    #13027
    Support Team
    Keymaster

    Hello @max,

    Glad that the issue is resolved.

    Let us know if you have any issues further.

    Thank You.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘WP Travel’ is closed to new topics and replies.