• Hi,

    I want to remove the “from” part from the shortcode room-rates price. What I did was copy the rate-content.php file from /wp-content/plugins/motopress-hotel-booking-lite/templates/shortcodes/room-rates/ to /wp-content/themes/my-child-theme/hotel-booking/shortcodes/room-rates/ and changing the output string like below but it doesn’t work:

    <?php
    /**
     * Available variables
     * - string $title
     * - string $minPrice
     * - string $description
     */
    if ( !defined( 'ABSPATH' ) ) {
    	exit;
    }
    ?>
    <?php do_action('mphb_sc_room_rates_item_top'); ?>
    
    <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    echo $title; ?>, <?php echo wp_kses_post( sprintf( __( '%s', 'motopress-hotel-booking' ), $minPrice ) ); ?>
    <br/>
    <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    echo $description; ?>
    
    <?php do_action('mphb_sc_room_rates_item_bottom'); ?>

    Does overriding of templates only work with the premium version of the plugin?

    Thanks

  • The topic ‘Override templates not working’ is closed to new replies.