Commit 70ff96ab by rajshah

feat: download count in resource detail v0.2

parent 0423911e
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
})(jQuery); })(jQuery);
// download count // download count
jQuery(document).ready(function ($) { jQuery(document).ready(function ($) {
$('.btn-download').on('click', function () { $('#btn-resource-download').on('click', function () {
const resourceId = $(this).data('resource-id'); const resourceId = $(this).data('resource-id');
$.ajax({ $.ajax({
......
...@@ -62,7 +62,7 @@ endif; ...@@ -62,7 +62,7 @@ endif;
<p><?php echo get_the_excerpt() ?: wp_trim_words(get_the_content(), 8, ' [...]'); ?> <p><?php echo get_the_excerpt() ?: wp_trim_words(get_the_content(), 8, ' [...]'); ?>
</p> </p>
<a href="<?php echo esc_url($url); ?>" target="_blank" <a href="<?php echo esc_url($url); ?>" target="_blank"
class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light" class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light" id="btn-resource-download"
download>Download download>Download
Now [<?php echo $icon; ?>]<svg width="24" height="24" viewBox="0 0 24 24" fill="none" Now [<?php echo $icon; ?>]<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg"> xmlns="http://www.w3.org/2000/svg">
...@@ -122,7 +122,7 @@ endif; ...@@ -122,7 +122,7 @@ endif;
<div class="row"> <div class="row">
<div class="col-md-6 col-lg-4 order-md-2"> <div class="col-md-6 col-lg-4 order-md-2">
<a href="<?php echo esc_url($url); ?>" target="_blank" <a href="<?php echo esc_url($url); ?>" target="_blank"
class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light" class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light" id="btn-resource-download"
download>Download download>Download
Now [<?php echo $icon; ?>]</a> Now [<?php echo $icon; ?>]</a>
</div> </div>
......
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