<h1><?php echo $queried_object->name; ?> </h1> <!-- <div class="row">--> <!-- <ul class="right" id="liststyle">--> <!-- <li><a href="#"><i class="mdi mdi-lg mdi-format-list-bulleted"></i></a></li>--> <!-- <li><a href="#"><i class="mdi mdi-lg mdi-view-column"></i></a></li>--> <!-- </ul>--> <!-- </div>--> <div class="row"> <?php // Start the loop. while (have_posts()) { the_post(); $tourinfo = get_tour_info(); ?> <!-- <div class="col m3 s12">--> <!-- <div class="card">--> <!-- <div class="card-image">--> <!-- <a href="--><?php //echo $post_link ?> <!--"><img src="--><?php //echo $feat_image_url ?> <!--" class=""></a>--> <!-- <span class="card-title">--><?php //echo $card_title ?> <!--</span>-->
function show_ndt_tour_newest($quantity) { $args = array('post_type' => 'ndt_tour', 'post_status' => 'publish', 'posts_per_page' => $quantity, 'order' => 'DESC', 'orderby' => 'date'); $tours = new WP_Query($args); echo '<h3 class="text-link">' . __('News') . '</h3>'; echo '<div class="row" id="side_news">'; while ($tours->have_posts()) { $tours->the_post(); $tourinfo = get_tour_info(); echo '<div class="col s12">'; echo '<div class="card">'; echo '<div class="card-image"><a href="' . $tourinfo['tour_post_link'] . '"> '; echo '<img src="' . $tourinfo['tour_feat_image_url'] . '"></a>'; echo '</div>'; echo '<a class="flow-text" href="' . $tourinfo['tour_post_link'] . '">' . $tourinfo['tour_title'] . '</a>'; echo '</div>'; echo '</div>'; } }
<?php include "../config.php"; $tour_id = $_GET['tour_id']; $tourRes = get_tour_info($tour_id); if ($tourRes->success == 0) { die("no tour info found"); } $tourInfo = $tourRes->tourInfo; $apiurl = hostname . "api/xml/tours/save_order"; $payload = file_get_contents("book_tour_and_item.xml"); // Now let's make a request! $request = Requests::post($apiurl, array(), array('__payload__' => $payload)); $result = simplexml_load_string($request->body); if ((int) $result->success == 0) { echo "Success : false<br />"; echo "Message : {$result->msg} <br /> No order could be generated"; } $order_id = $result->order->ID; ?> <html> <head> <meta charset="UTF-8"> <title></title> <style> label {display: block; margin-bottom: 10px}; </style> </head> <body> <div style="width: 1024px; margin: 0 auto"> <?php