form v sablone je podla klienta nepouzitelny. preto som nasiel plugin, v ktorom sa to da.
nim teraz musim nahradit zalozku v sablone novou. ktora bude obsahovat formular z pluginu.
Kód: Vybrať všetko
<?php echo do_shortcode('[caldera_form id="CF55395a8e6e34b"]'); ?>Takže žiadny problém vlastne nie jejackb napísal:nerobi mi problem vkladat do novy zajazdov formular manualne
Kód: Vybrať všetko
Rendered template: wp-content/themes/BookYourTravel/single-tour.phpKód: Vybrať všetko
<!--availability-->
<section id="availability" class="tab-content <?php echo $first_display_tab == 'availability' ? 'initial' : ''; ?>">
<article>
<?php do_action( 'byt_show_single_tour_availability_before' ); ?>
<h1><?php _e('Available departures', 'bookyourtravel'); ?></h1>
<?php byt_render_field("text-wrap", "", "", $tour_obj->get_custom_field('availability_text'), '', false, true); ?>
<form id="launch-tour-booking" action="#" method="POST">
<div class="text-wrap">
<?php
if ($tour_obj->get_type_is_repeated() == 1) {
echo __('<p>This is a daily tour.</p>', 'bookyourtravel');
} else if ($tour_obj->get_type_is_repeated() == 2) {
echo __('<p>This tour is repeated every weekday (working day).</p>', 'bookyourtravel');
} else if ($tour_obj->get_type_is_repeated() == 3) {
echo sprintf(__('<p>This tour is repeated every week on a %s.</p>', 'bookyourtravel'), $tour_obj->get_type_day_of_week_day());
}
$schedule_entries = list_available_tour_schedule_entries($tour_obj->get_id(), $tour_date_from, $tour_date_from_year, $tour_date_from_month, $tour_obj->get_type_is_repeated(), $tour_obj->get_type_day_of_week_index());
if (count($schedule_entries) > 0) {
byt_render_link_button("#", "clearfix gradient-button book_tour", "", __('Book now', 'bookyourtravel'));
} else {
echo __('Unfortunately, no places are available on this tour at the moment', 'bookyourtravel');
}
?>
</div>
</form>
<?php byt_render_tab_extra_fields('tour_extra_fields', $tour_extra_fields, 'availability', $tour_obj); ?>
<?php do_action( 'byt_show_single_tour_availability_after' ); ?>
</article>
</section>
<!--//availability-->Kód: Vybrať všetko
<!--availability-->
<section id="availability" class="tab-content <?php echo $first_display_tab == 'availability' ? 'initial' : ''; ?>">
<article>
<?php echo do_shortcode('[caldera_form id="CF55395a8e6e34b"]'); ?>
</article>
</section>
<!--//availability-->