Commit 28572fb5 by Muhammad Usman

all fixes other than form shortcode

parent f134a8d7
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="intro-box"> <div class="intro-box">
<div class="intro-heading"> <div class="intro-heading">
<h2>Special <br>intro <br>price</h2> <h2>Special <br>intro <br>price</h2>
<h3>$1.00</h3> <h3>$[[FEE]]</h3>
<h4>Per user / Per month</h4> <h4>Per user / Per month</h4>
</div> </div>
</div> </div>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="intro-heading"> <div class="intro-heading">
<p>[[BANNER_DESCRIPTION]]</p> <p>[[BANNER_DESCRIPTION]]</p>
</div> </div>
<a href="[[REDIRECT_URL]]" class="learn-button-1">Learn More</a> <a href="[[REDIRECT_URL]]" class="learn-button-1 pull-right">Learn More</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -203,6 +203,13 @@ function vq_render_course_banner($attr) { ...@@ -203,6 +203,13 @@ function vq_render_course_banner($attr) {
$page = get_post($cid); $page = get_post($cid);
$fee = get_post_meta($page->ID, 'course_fee', true);
if(empty($fee) || $fee <= 0) {
$settings = get_option('vq_lms_settings_options');
$fee = $settings['vq_lms_settings_field_general_price'];
}
$banner = file_get_contents(__DIR__ . '/admin/includes/large-banner.html'); $banner = file_get_contents(__DIR__ . '/admin/includes/large-banner.html');
$banner = str_replace('[[BANNER_HEADING]]', $page->post_title, $banner); $banner = str_replace('[[BANNER_HEADING]]', $page->post_title, $banner);
...@@ -213,6 +220,8 @@ function vq_render_course_banner($attr) { ...@@ -213,6 +220,8 @@ function vq_render_course_banner($attr) {
$banner = str_replace('[[REDIRECT_URL]]', get_permalink($page->ID), $banner); $banner = str_replace('[[REDIRECT_URL]]', get_permalink($page->ID), $banner);
$banner = str_replace('[[FEE]]', $fee, $banner);
return $banner; return $banner;
} }
...@@ -652,4 +652,14 @@ ...@@ -652,4 +652,14 @@
.bootstrap-iso .lms-courses-select { .bootstrap-iso .lms-courses-select {
display: none; display: none;
margin-top: 15px; margin-top: 15px;
}
.bootstrap-iso .descrip{
height: 150px;
}
.bootstrap-iso .descrip p {
line-height: 20px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
\ No newline at end of file
...@@ -56,6 +56,8 @@ $page = get_page_by_path('download-all'); ...@@ -56,6 +56,8 @@ $page = get_page_by_path('download-all');
$settings = $options = get_option('vq_lms_settings_options'); $settings = $options = get_option('vq_lms_settings_options');
$video = $settings['vq_lms_settings_field_video']; $video = $settings['vq_lms_settings_field_video'];
$courses = new WP_Query(array('post_type' => 'vq_course')); $courses = new WP_Query(array('post_type' => 'vq_course'));
$selected_id = isset($_GET['course']) ? $_GET['course'] : -1;
?> ?>
<div class="bootstrap-iso"> <div class="bootstrap-iso">
<div class="e-learning-banner" style="background-image: url(<?php echo get_the_post_thumbnail_url($page); ?>)"> <div class="e-learning-banner" style="background-image: url(<?php echo get_the_post_thumbnail_url($page); ?>)">
...@@ -350,7 +352,7 @@ $courses = new WP_Query(array('post_type' => 'vq_course')); ...@@ -350,7 +352,7 @@ $courses = new WP_Query(array('post_type' => 'vq_course'));
while($courses->have_posts()) { while($courses->have_posts()) {
$courses->the_post(); $courses->the_post();
?> ?>
<option value="<?php the_ID(); ?>"><?php the_title(); ?></option> <option value="<?php the_ID(); ?>" <?php if(get_the_ID() == $selected_id) echo ' selected'; ?>><?php the_title(); ?></option>
<?php <?php
} }
$page = get_page_by_path('download-all'); $page = get_page_by_path('download-all');
......
...@@ -36,8 +36,8 @@ $course_categories = get_terms( array( ...@@ -36,8 +36,8 @@ $course_categories = get_terms( array(
</div> </div>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="e-learning-heading"> <div class="e-learning-heading descrip">
<p><?php echo $category->description ?></p> <p><?php echo substr($category->description, 0,150) . ' ...' ; ?></p>
</div> </div>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
......
...@@ -44,8 +44,7 @@ $courses = new WP_Query($args); ...@@ -44,8 +44,7 @@ $courses = new WP_Query($args);
<div class="col-sm-3 col-padding"> <div class="col-sm-3 col-padding">
<div class="download-course-box"> <div class="download-course-box">
<div class="course-heading"> <div class="course-heading">
<?php $aid = get_post_meta(get_the_ID(), 'course_attachment_id', true) ?> <h4><a href="<?php echo '/download-alla?course=' .get_the_ID(); ?>">Download <br>course list</a></h4>
<h4><a href="<?php echo wp_get_attachment_url($aid); ?>">Download <br>course list</a></h4>
</div> </div>
<div class="text-center"> <div class="text-center">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment